File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
GROUP =io.reactivex
2
- VERSION_NAME =1.0-SNAPSHOT
2
+ VERSION_NAME =1.0
3
3
POM_NAME =RxAndroid
4
4
POM_PACKAGING =aar
5
5
POM_DESCRIPTION =RxAndroid
Original file line number Diff line number Diff line change @@ -15,7 +15,18 @@ apply plugin: 'com.jfrog.bintray'
15
15
apply plugin : ' com.jfrog.artifactory-upload'
16
16
17
17
group = GROUP
18
- version = VERSION_NAME
18
+
19
+ // Both the artifactory and bintray plugins depend on this singular
20
+ // global `version` variable. As such, we need to configure it based
21
+ // on which task we're running.
22
+ //
23
+ // The solution here is brittle; it just checks whether 'bintrayUpload'
24
+ // was called for execution, otherwise it assumes SNAPSHOT. If we
25
+ // were to wait until the task graph was built, we'd be too late
26
+ // (the plugins would already have used `version`).
27
+ boolean isReleaseBuild = gradle. startParameter. taskNames. contains(' bintrayUpload' )
28
+ version = isReleaseBuild ? VERSION_NAME : " $VERSION_NAME -SNAPSHOT"
29
+ logger. info(" RxAndroid using version=$project . version " )
19
30
20
31
android {
21
32
compileSdkVersion rootProject. ext. compileSdkVersion
You can’t perform that action at this time.
0 commit comments