File tree 1 file changed +23
-11
lines changed
spring-boot-project/spring-boot-tools/spring-boot-cli
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
+
1
4
plugins {
2
5
id " java"
3
6
id " eclipse"
@@ -104,17 +107,27 @@ task tar(type: Tar) {
104
107
configureArchive it
105
108
}
106
109
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
+ }
113
117
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
+ }
118
131
}
119
132
120
133
publishing {
@@ -123,7 +136,6 @@ publishing {
123
136
artifact fullJar
124
137
artifact tar
125
138
artifact zip
126
- artifact homebrewFormulaArtifact
127
139
}
128
140
}
129
141
}
You can’t perform that action at this time.
0 commit comments