forked from cflint/CFLint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.gradle
28 lines (25 loc) · 914 Bytes
/
deploy.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
configurations {
jaxDoclet
}
nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
task deploy() {
if (release.toBoolean() == true) {
def strippedSnapshotVersion = version.replaceFirst(/-SNAPSHOT/, '')
ant.propertyfile(file: "gradle.properties") {
entry( key: "version", value: "$strippedSnapshotVersion")
entry( key: "release", value: "false")
}
}
else if (snapshot.toBoolean() == true) {
def strippedSnapshotVersion = version.replaceFirst(/-SNAPSHOT/, '')
ant.propertyfile(file: "gradle.properties") {
entry( key: "version", value: "$strippedSnapshotVersion-SNAPSHOT")
entry( key: "snapshot", value: "false")
}
}
}
uploadArchives.mustRunAfter deploy