Skip to content

Commit a23c51d

Browse files
authored
chore: refactor travis to fix snapshot upload failure (#381)
1 parent 7a10d23 commit a23c51d

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

.travis.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,12 @@ dist: trusty
44
jdk: oraclejdk8
55

66
env:
7-
global:
8-
- ANDROID_API=29 # api is same as gradle file
9-
- ANDROID_BUILD_TOOLS=29.0.3 # should match gradle
10-
- ADB_INSTALL_TIMEOUT=5 # minutes
11-
- ANDROID_TAG=google_apis
12-
- ANDROID_ABI=armeabi-v7a
13-
jobs:
147
# API 26+ supports "x86" (ANDROID_ABI=x86) emulators only, which are not supported yet in travis VMs
158
# so API 24 is the highest level we can run with emulator for now
16-
- EMULATOR_API=19 # API-16 build fails in travis
17-
- EMULATOR_API=21
18-
- EMULATOR_API=24
9+
# API-16 build fails in travis
10+
- EMULATOR_API=19 ANDROID_ABI=armeabi-v7a ANDROID_API=29 ANDROID_BUILD_TOOLS=29.0.3
11+
- EMULATOR_API=21 ANDROID_ABI=armeabi-v7a ANDROID_API=29 ANDROID_BUILD_TOOLS=29.0.3
12+
- EMULATOR_API=24 ANDROID_ABI=armeabi-v7a ANDROID_API=29 ANDROID_BUILD_TOOLS=29.0.3
1913

2014
android:
2115
components:
@@ -53,13 +47,17 @@ script:
5347

5448
# Integration tests need to run first to reset the PR build status to pending
5549
stages:
56-
- 'Source Clear'
57-
- 'Lint markdown files'
58-
- 'Integration tests'
59-
- 'Test'
60-
- 'Publish'
61-
- 'Snapshot'
62-
50+
- name: 'Source Clear'
51+
if: type = cron
52+
- name: 'Lint markdown files'
53+
- name: 'Integration tests'
54+
- name: 'Test'
55+
if: env(SNAPSHOT) IS NOT present
56+
- name: 'Publish'
57+
if: tag IS present
58+
- name: 'Snapshot'
59+
if: env(SNAPSHOT) = true and type = api
60+
6361
jobs:
6462
include:
6563
- stage: 'Lint markdown files'
@@ -89,7 +87,6 @@ jobs:
8987
after_success: travis_terminate 0
9088

9189
- stage: 'Source Clear'
92-
if: type = cron
9390
addons:
9491
srcclr: true
9592
before_install: skip
@@ -100,14 +97,17 @@ jobs:
10097
after_success: skip
10198

10299
- stage: 'Publish'
103-
if: tag IS present
104100
script:
105101
- ./gradlew ship
106102
after_script: skip
107103
after_success: skip
108104

109105
- stage: 'Snapshot'
110-
if: env(SNAPSHOT) = true and type = api
106+
before_install:
107+
# required to accept Android licenses before install
108+
- yes | sdkmanager "platforms;android-29"
109+
before_script: skip
111110
script:
112111
- TRAVIS_TAG=BB-SNAPSHOT ./gradlew ship
112+
after_script: skip
113113
after_success: skip

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ allprojects {
4545
jcenter()
4646
google()
4747
mavenCentral()
48-
// Uncomment the next line to use maven locally
49-
//mavenLocal()
48+
// SNAPSHOT support
49+
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
5050
}
5151
}
5252

@@ -55,7 +55,7 @@ ext {
5555
build_tools_version = "29.0.3"
5656
min_sdk_version = 14
5757
target_sdk_version = 29
58-
java_core_ver = "3.8.2"
58+
java_core_ver = "BB-SNAPSHOT"
5959
android_logger_ver = "1.3.6"
6060
jacksonversion= "2.11.2"
6161
annotations_ver = "1.0.0"

0 commit comments

Comments
 (0)