.gitlab-ci.yml 1.73 KB
Newer Older
1 2 3 4
# This file is a template, and might need editing before it works on your project.
# Read more about this script on this blog post https://about.gitlab.com/2018/10/24/setting-up-gitlab-ci-for-android-projects/, by Jason Lenny
# If you are interested in using Android with FastLane for publishing take a look at the Android-Fastlane template.

Malena López-Batista's avatar
Wallet  
Malena López-Batista committed
5
image: openjdk:8-jdk
Malena López-Batista's avatar
Malena López-Batista committed
6 7

variables:
8 9 10
  ANDROID_COMPILE_SDK: "28"
  ANDROID_BUILD_TOOLS: "28.0.2"
  ANDROID_SDK_TOOLS: "4333796"
Malena López-Batista's avatar
Malena López-Batista committed
11 12

before_script:
Malena López-Batista's avatar
Wallet  
Malena López-Batista committed
13
  - apt-get --quiet update --yes
14
  - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
Malena López-Batista's avatar
Wallet  
Malena López-Batista committed
15
  - apt-get install -yqq --no-install-recommends build-essential libsodium-dev
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
  - unzip -d android-sdk-linux android-sdk.zip
  - echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
  - echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
  - echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
  - export ANDROID_HOME=$PWD/android-sdk-linux
  - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
  - chmod +x ./gradlew
  # temporarily disable checking for EPIPE error and use yes to accept all licenses
  - set +o pipefail
  - yes | android-sdk-linux/tools/bin/sdkmanager --licenses
  - set -o pipefail

lintDebug:
  stage: build
  script:
    - ./gradlew -Pci --console=plain :JavaTezos:lintDebug -PbuildDir=lint
Malena López-Batista's avatar
Malena López-Batista committed
33

34
assembleDebug:
Malena López-Batista's avatar
Malena López-Batista committed
35
  stage: build
36 37 38
  script:
    - ./gradlew assembleDebug
  artifacts:
Malena López-Batista's avatar
Malena López-Batista committed
39
    paths:
40
      - app/build/outputs/
Malena López-Batista's avatar
Malena López-Batista committed
41

42
debugTests:
Malena López-Batista's avatar
Malena López-Batista committed
43
  stage: test
44 45
  script:
    - ./gradlew -Pci --console=plain :JavaTezos:testDebug