use android base image. set ANDROID_SDK_ROOT env.

This commit is contained in:
Akinwale Ariwodola 2020-02-27 14:49:22 +01:00
parent ff2a447012
commit bb6f30ba9a
2 changed files with 4 additions and 3 deletions

View file

@ -5,15 +5,16 @@ stages:
build apk: build apk:
stage: build stage: build
image: ubuntu:18.04 image: lbry/android-base:latest
before_script: before_script:
- apt-get -y update && apt-get -y install build-essential ca-certificates curl git gpg-agent openjdk-8-jdk software-properties-common wget zipalign - apt-get -y update && apt-get -y install build-essential ca-certificates curl git gpg-agent openjdk-8-jdk software-properties-common wget zipalign
- wget https://nodejs.org/dist/latest-v10.x/node-v10.19.0-linux-x64.tar.gz - wget -q https://nodejs.org/dist/latest-v10.x/node-v10.19.0-linux-x64.tar.gz
- tar xf node-v10.19.0-linux-x64.tar.gz -C /opt - tar xf node-v10.19.0-linux-x64.tar.gz -C /opt
- ln -s /opt/node-v10.19.0-linux-x64/bin/node /usr/bin/node - ln -s /opt/node-v10.19.0-linux-x64/bin/node /usr/bin/node
- ln -s /opt/node-v10.19.0-linux-x64/bin/npm /usr/bin/npm - ln -s /opt/node-v10.19.0-linux-x64/bin/npm /usr/bin/npm
- ln -s /opt/node-v10.19.0-linux-x64/bin/npx /usr/bin/npx - ln -s /opt/node-v10.19.0-linux-x64/bin/npx /usr/bin/npx
- chmod u+x $CI_PROJECT_DIR/gradlew - chmod u+x $CI_PROJECT_DIR/gradlew
- export ANDROID_SDK_ROOT=~/.buildozer/android/platform/android-sdk-23
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -q printVersionName --console=plain | tail -1) - export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -q printVersionName --console=plain | tail -1)
artifacts: artifacts:
paths: paths:

View file

@ -2,7 +2,7 @@
./gradlew assembleRelease --console=plain ./gradlew assembleRelease --console=plain
version=$(./gradlew -q printVersionName --console=plain | tail -1) version=$(./gradlew -q printVersionName --console=plain | tail -1)
mkdir -p bin/ mkdir -p bin/
rm bin/* rm -f bin/*
cp app/build/outputs/apk/__32bit/release/app-__32bit-release.apk bin/browser-$version-release-unsigned__arm.apk cp app/build/outputs/apk/__32bit/release/app-__32bit-release.apk bin/browser-$version-release-unsigned__arm.apk
cp app/build/outputs/apk/__64bit/release/app-__64bit-release.apk bin/browser-$version-release-unsigned__arm64.apk cp app/build/outputs/apk/__64bit/release/app-__64bit-release.apk bin/browser-$version-release-unsigned__arm64.apk