Source format and clean-up
This commit is contained in:
@@ -26,7 +26,7 @@ import org.springframework.boot.gradle.task.RunJar;
|
||||
|
||||
/**
|
||||
* Gradle 'Spring Boot' {@link Plugin}.
|
||||
*
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class SpringBootPlugin implements Plugin<Project> {
|
||||
@@ -53,12 +53,14 @@ public class SpringBootPlugin implements Plugin<Project> {
|
||||
}
|
||||
|
||||
private Repackage addRepackageTask(Project project) {
|
||||
Repackage packageTask = project.getTasks().create(REPACKAGE_TASK_NAME, Repackage.class);
|
||||
Repackage packageTask = project.getTasks().create(REPACKAGE_TASK_NAME,
|
||||
Repackage.class);
|
||||
packageTask.setDescription("Repackage existing JAR and WAR "
|
||||
+ "archives so that they can be executed from the command " + "line using 'java -jar'");
|
||||
+ "archives so that they can be executed from the command "
|
||||
+ "line using 'java -jar'");
|
||||
packageTask.setGroup(BasePlugin.BUILD_GROUP);
|
||||
packageTask.dependsOn(project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION)
|
||||
.getAllArtifacts().getBuildDependencies());
|
||||
packageTask.dependsOn(project.getConfigurations().getByName(
|
||||
Dependency.ARCHIVES_CONFIGURATION).getAllArtifacts().getBuildDependencies());
|
||||
return packageTask;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package org.springframework.boot.gradle.task;
|
||||
|
||||
import java.io.File;
|
||||
@@ -23,6 +24,7 @@ class ProjectLibraries implements Libraries {
|
||||
|
||||
/**
|
||||
* Create a new {@link ProjectLibraries} instance of the specified {@link Project}.
|
||||
*
|
||||
* @param project the gradle project
|
||||
*/
|
||||
public ProjectLibraries(Project project) {
|
||||
@@ -31,6 +33,7 @@ class ProjectLibraries implements Libraries {
|
||||
|
||||
/**
|
||||
* Set the name of the provided configuration. Defaults to 'providedRuntime'.
|
||||
*
|
||||
* @param providedConfigurationName the providedConfigurationName to set
|
||||
*/
|
||||
public void setProvidedConfigurationName(String providedConfigurationName) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.boot.loader.tools.Repackager;
|
||||
|
||||
/**
|
||||
* Repackage task.
|
||||
*
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class Repackage extends DefaultTask {
|
||||
@@ -44,6 +44,7 @@ public class Repackage extends DefaultTask {
|
||||
libraries.setProvidedConfigurationName(extension.getProvidedConfiguration());
|
||||
}
|
||||
project.getTasks().withType(Jar.class, new Action<Jar>() {
|
||||
|
||||
@Override
|
||||
public void execute(Jar archive) {
|
||||
if ("".equals(archive.getClassifier())) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.gradle.process.internal.ExecAction;
|
||||
|
||||
/**
|
||||
* Run Jar task. Run the built jar file from Gradle.
|
||||
*
|
||||
*
|
||||
* @author Dave Noel
|
||||
*/
|
||||
public class RunJar extends DefaultTask {
|
||||
@@ -40,6 +40,7 @@ public class RunJar extends DefaultTask {
|
||||
public void runJar() {
|
||||
Project project = getProject();
|
||||
project.getTasks().withType(Jar.class, new Action<Jar>() {
|
||||
|
||||
@Override
|
||||
public void execute(Jar archive) {
|
||||
file = archive.getArchivePath();
|
||||
|
||||
Reference in New Issue
Block a user