This commit is contained in:
Andy Wilkinson
2018-02-08 11:15:36 +00:00
parent 70c613819d
commit a09c64e18c
12 changed files with 31 additions and 24 deletions

View File

@@ -64,7 +64,7 @@ final class JavaPluginAction implements PluginApplicationAction {
disableJarTask(project);
configureBuildTask(project);
BootJar bootJar = configureBootJarTask(project);
configureArtifactPublication(project, bootJar);
configureArtifactPublication(bootJar);
configureBootRunTask(project);
configureUtf8Encoding(project);
configureParametersCompilerArg(project);
@@ -98,7 +98,7 @@ final class JavaPluginAction implements PluginApplicationAction {
return bootJar;
}
private void configureArtifactPublication(Project project, BootJar bootJar) {
private void configureArtifactPublication(BootJar bootJar) {
ArchivePublishArtifact artifact = new ArchivePublishArtifact(bootJar);
this.singlePublishedArtifact.addCandidate(artifact);
}
@@ -140,14 +140,12 @@ final class JavaPluginAction implements PluginApplicationAction {
}
private void configureAdditionalMetadataLocations(Project project) {
project.afterEvaluate((evaluated) -> {
project.afterEvaluate((evaluated) ->
evaluated.getTasks().withType(JavaCompile.class,
(compile) -> configureAdditionalMetadataLocations(project, compile));
});
this::configureAdditionalMetadataLocations));
}
private void configureAdditionalMetadataLocations(Project project,
JavaCompile compile) {
private void configureAdditionalMetadataLocations(JavaCompile compile) {
compile.doFirst((task) -> {
if (hasConfigurationProcessorOnClasspath(compile)) {
findMatchingSourceSet(compile).ifPresent((sourceSet) -> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.gradle.api.Project;
*
* @author Andy Wilkinson
*/
@SuppressWarnings("serial")
public class BuildInfoProperties implements Serializable {
private final transient Project project;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import org.springframework.boot.loader.tools.FileUtils;
* @author Andy Wilkinson
* @since 2.0.0
*/
@SuppressWarnings("serial")
public class LaunchScriptConfiguration implements Serializable {
private final Map<String, String> properties = new HashMap<>();