Address Gradle deprecation warnings

Closes gh-47876
This commit is contained in:
Andy Wilkinson
2025-10-30 11:13:39 +00:00
parent 1ab93be650
commit 45978e2069
3 changed files with 14 additions and 11 deletions
+5 -8
View File
@@ -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"
}
}
}
}