Skip to content

Commit d149463

Browse files
committed
Update build script for publishing snapshots
1 parent 2bb6d7d commit d149463

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,27 +179,27 @@ subprojects {
179179
}
180180

181181
artifactory {
182-
contextUrl = 'https://oss.jfrog.org'
182+
contextUrl = 'http://oss.jfrog.org'
183183
publish {
184184
repository {
185-
repoKey = 'oss-snapshot-local'
186-
187-
username = System.env.BINTRAY_USER ?: System.getProperty('BINTRAY_USER')
188-
password = System.env.BINTRAY_PASS ?: System.getProperty('BINTRAY_PASS')
189-
190-
maven = true
185+
if (project.version.endsWith("-SNAPSHOT")) {
186+
repoKey = 'oss-snapshot-local'
187+
} else {
188+
repoKey = 'oss-release-local'
189+
}
190+
username = System.env.BINTRAY_USER ?: project.findProperty('BINTRAY_USER') ?: ''
191+
password = System.env.BINTRAY_PASS ?: project.findProperty('BINTRAY_PASS') ?: ''
191192
}
192193
defaults {
193-
publications 'maven'
194+
publications('mainProjectPublication')
194195
publishArtifacts = true
195196
publishPom = true
196197
}
197198
}
198199
resolve {
199-
repository {
200-
repoKey = 'jcenter'
201-
}
200+
repoKey = 'oss-snapshot-local'
202201
}
202+
clientConfig.info.setBuildNumber(System.getProperty('build.number'))
203203
}
204204
}
205205
}

0 commit comments

Comments
 (0)