Skip to content

Commit f54dc4a

Browse files
authored
travis: manually install Android since Travis is stale (#22373)
1 parent bf5b379 commit f54dc4a

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

‎.travis.yml‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,33 +122,32 @@ jobs:
122122
addons:
123123
apt:
124124
packages:
125-
- oracle-java8-installer
126-
- oracle-java8-set-default
127-
language: android
128-
android:
129-
components:
130-
- platform-tools
131-
- tools
132-
- android-15
133-
- android-19
134-
- android-24
125+
- openjdk-8-jdk
135126
env:
136127
- azure-android
137128
- maven-android
138129
- GO111MODULE=on
139130
git:
140131
submodules: false # avoid cloning ethereum/tests
141132
before_install:
133+
# Install Android and it's dependencies manually, Travis is stale
134+
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
135+
- curl https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip -o android.zip
136+
- unzip -q android.zip -d $HOME/sdk && rm android.zip
137+
- mv $HOME/sdk/cmdline-tools $HOME/sdk/latest && mkdir $HOME/sdk/cmdline-tools && mv $HOME/sdk/latest $HOME/sdk/cmdline-tools
138+
- export PATH=$PATH:$HOME/sdk/cmdline-tools/latest/bin
139+
- export ANDROID_HOME=$HOME/sdk
140+
141+
- yes | sdkmanager --licenses >/dev/null
142+
- sdkmanager "platform-tools" "platforms;android-15" "platforms;android-19" "platforms;android-24" "ndk-bundle"
143+
144+
# Install Go to allow building with
142145
- curl https://dl.google.com/go/go1.16.linux-amd64.tar.gz | tar -xz
143146
- export PATH=`pwd`/go/bin:$PATH
144147
- export GOROOT=`pwd`/go
145148
- export GOPATH=$HOME/go
146149
script:
147150
# Build the Android archive and upload it to Maven Central and Azure
148-
- curl https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip -o android-ndk-r21e.zip
149-
- unzip -q android-ndk-r21e.zip && rm android-ndk-r21e.zip
150-
- mv android-ndk-r21e $ANDROID_HOME/ndk-bundle
151-
152151
- mkdir -p $GOPATH/src/github.com/ethereum
153152
- ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
154153
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -signify SIGNIFY_KEY -deploy https://oss.sonatype.org -upload gethstore/builds

0 commit comments

Comments
 (0)