File tree Expand file tree Collapse file tree 1 file changed +23
-11
lines changed
spring-boot-project/spring-boot-tools/spring-boot-cli Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Original file line number Diff line number Diff line change 1+ import org.springframework.boot.build.properties.BuildProperties
2+ import org.springframework.boot.build.properties.BuildType
3+
14plugins {
25 id " java"
36 id " eclipse"
@@ -104,17 +107,27 @@ task tar(type: Tar) {
104107 configureArchive it
105108}
106109
107- task homebrewFormula (type : org.springframework.boot.build.cli.HomebrewFormula ) {
108- dependsOn tar
109- outputDir = layout. buildDirectory. dir(" homebrew" )
110- template = file(" src/main/homebrew/spring-boot.rb" )
111- archive = tar. archiveFile
112- }
110+ if (BuildProperties . get(project). buildType() == BuildType . OPEN_SOURCE ) {
111+ task homebrewFormula(type : org.springframework.boot.build.cli.HomebrewFormula ) {
112+ dependsOn tar
113+ outputDir = layout. buildDirectory. dir(" homebrew" )
114+ template = file(" src/main/homebrew/spring-boot.rb" )
115+ archive = tar. archiveFile
116+ }
113117
114- def homebrewFormulaArtifact = artifacts. add(" archives" , file(layout. buildDirectory. file(" homebrew/spring-boot.rb" ))) {
115- type " rb"
116- classifier " homebrew"
117- builtBy " homebrewFormula"
118+ def homebrewFormulaArtifact = artifacts. add(" archives" , file(layout. buildDirectory. file(" homebrew/spring-boot.rb" ))) {
119+ type " rb"
120+ classifier " homebrew"
121+ builtBy " homebrewFormula"
122+ }
123+
124+ publishing {
125+ publications {
126+ getByName(" maven" ) {
127+ artifact homebrewFormulaArtifact
128+ }
129+ }
130+ }
118131}
119132
120133publishing {
@@ -123,7 +136,6 @@ publishing {
123136 artifact fullJar
124137 artifact tar
125138 artifact zip
126- artifact homebrewFormulaArtifact
127139 }
128140 }
129141}
You can’t perform that action at this time.
0 commit comments