File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 8
8
- ANDROID_API=29 # api is same as gradle file
9
9
- ANDROID_BUILD_TOOLS=29.0.3 # should match gradle
10
10
- ADB_INSTALL_TIMEOUT=5 # minutes
11
- matrix :
11
+ - ANDROID_TAG=google_apis
12
+ - ANDROID_ABI=armeabi-v7a
13
+ jobs :
12
14
# API 26+ supports "x86" (ANDROID_ABI=x86) emulators only, which are not supported yet in travis VMs
13
15
# so API 24 is the highest level we can run with emulator for now
14
- - EMULATOR_API=19 ANDROID_TAG=google_apis ANDROID_ABI=armeabi-v7a # API-16 build fails in travis
15
- - EMULATOR_API=21 ANDROID_TAG=google_apis ANDROID_ABI=armeabi-v7a
16
- - EMULATOR_API=24 ANDROID_TAG=google_apis ANDROID_ABI=armeabi-v7a
16
+ - EMULATOR_API=19 # API-16 build fails in travis
17
+ - EMULATOR_API=21
18
+ - EMULATOR_API=24
17
19
18
20
android :
19
21
components :
@@ -56,7 +58,8 @@ stages:
56
58
- ' Integration tests'
57
59
- ' Test'
58
60
- ' Publish'
59
-
61
+ - ' Snapshot'
62
+
60
63
jobs :
61
64
include :
62
65
- stage : ' Lint markdown files'
@@ -103,3 +106,8 @@ jobs:
103
106
after_script : skip
104
107
after_success : skip
105
108
109
+ - stage : ' Snapshot'
110
+ if : env(SNAPSHOT) = true and type = api
111
+ script :
112
+ - TRAVIS_TAG=BB-SNAPSHOT ./gradlew ship
113
+ after_success : skip
Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ buildscript {
23
23
if (version_name != null ) {
24
24
rootProject. ext. version_name = version_name
25
25
} else {
26
- rootProject. ext. version_name= ' debugVersion'
26
+ rootProject. ext. version_name = ' debugVersion'
27
27
}
28
+ ext. is_release_version = ! rootProject. ext. version_name. endsWith(" SNAPSHOT" )
29
+
28
30
repositories {
29
31
jcenter()
30
32
google()
@@ -191,7 +193,9 @@ configure(publishedProjects) {
191
193
}
192
194
repositories {
193
195
maven {
194
- url " https://oss.sonatype.org/service/local/staging/deploy/maven2"
196
+ def releaseUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
197
+ def snapshotUrl = " https://oss.sonatype.org/content/repositories/snapshots"
198
+ url = is_release_version ? releaseUrl : snapshotUrl
195
199
credentials {
196
200
username System . getenv(' MAVEN_CENTRAL_USERNAME' )
197
201
password System . getenv(' MAVEN_CENTRAL_PASSWORD' )
You can’t perform that action at this time.
0 commit comments