diff --git a/build.gradle b/build.gradle index 7eb83591850..84acc860390 100644 --- a/build.gradle +++ b/build.gradle @@ -32,8 +32,8 @@ subprojects { repositories { mavenCentral() maven { - name "Shibboleth Releases" - url "https://build.shibboleth.net/nexus/content/repositories/releases" + name = "Shibboleth Releases" + url = "https://build.shibboleth.net/nexus/content/repositories/releases" content { includeGroup "org.opensaml" includeGroup "net.shibboleth" diff --git a/buildSrc/src/main/java/org/springframework/boot/build/test/autoconfigure/GenerateTestSliceMetadata.java b/buildSrc/src/main/java/org/springframework/boot/build/test/autoconfigure/GenerateTestSliceMetadata.java index bf18f932b47..0dadfc405b5 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/test/autoconfigure/GenerateTestSliceMetadata.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/test/autoconfigure/GenerateTestSliceMetadata.java @@ -39,7 +39,9 @@ import org.gradle.api.Task; import org.gradle.api.file.FileCollection; import org.gradle.api.file.RegularFileProperty; import org.gradle.api.model.ObjectFactory; +import org.gradle.api.provider.Property; import org.gradle.api.tasks.Classpath; +import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.PathSensitive; @@ -73,6 +75,7 @@ public abstract class GenerateTestSliceMetadata extends DefaultTask { @Inject public GenerateTestSliceMetadata(ObjectFactory objectFactory) { this.objectFactory = objectFactory; + this.getModuleName().convention(getProject().getName()); } public void setSourceSet(SourceSet sourceSet) { @@ -91,6 +94,9 @@ public abstract class GenerateTestSliceMetadata extends DefaultTask { @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getSpringFactories(); + @Input + public abstract Property getModuleName(); + @Classpath FileCollection getClasspath() { return this.classpath; @@ -126,7 +132,7 @@ public abstract class GenerateTestSliceMetadata extends DefaultTask { testSlices.addAll(readTestSlices(classesDir, metadataReaderFactory, springFactories)); } } - return new TestSliceMetadata(getProject().getName(), testSlices); + return new TestSliceMetadata(getModuleName().get(), testSlices); } /** diff --git a/cli/spring-boot-cli/build.gradle b/cli/spring-boot-cli/build.gradle index a4a26bcd992..f9ed30236cb 100644 --- a/cli/spring-boot-cli/build.gradle +++ b/cli/spring-boot-cli/build.gradle @@ -127,23 +127,20 @@ tasks.register("tar", Tar) { } if (BuildProperties.get(project).buildType() == BuildType.OPEN_SOURCE) { - tasks.register("homebrewFormula", org.springframework.boot.build.cli.HomebrewFormula) { + def homebrewFormula = tasks.register("homebrewFormula", org.springframework.boot.build.cli.HomebrewFormula) { dependsOn tar outputDir = layout.buildDirectory.dir("homebrew") template = file("src/main/homebrew/spring-boot.rb") archive = tar.archiveFile } - def homebrewFormulaArtifact = artifacts.add("archives", file(layout.buildDirectory.file("homebrew/spring-boot.rb"))) { - type = "rb" - classifier = "homebrew" - builtBy "homebrewFormula" - } - publishing { publications { getByName("maven") { - artifact homebrewFormulaArtifact + artifact(homebrewFormula.map { it.outputDir.file("spring-boot.rb") }) { formula -> + formula.classifier = "homebrew" + formula.extension = "rb" + } } } }