summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: 6bac87a46d1981dafd84b7a98def2e2c0ca7e811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: 2

jobs:
  build:
    docker:
      - image: circleci/android:api-26-alpha

    working_directory: ~/AntennaPod

    environment:
      GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError"'
      _JAVA_OPTIONS: "-Xms256m -Xmx1280m"

    steps:
      - checkout
      
      - restore_cache:
          keys:
            - v1-android-{{ checksum "build.gradle" }}
            # fallback to using the latest cache if no exact match is found
            - v1-android-

      - run:
          # To build release, we need to create a temporary keystore that can be used to sign the app
          command: |
            keytool -noprompt -genkey -v -keystore "app/keystore" -alias alias -storepass password -keypass password -keyalg RSA -validity 10 -dname "CN=antennapod.org, OU=dummy, O=dummy, L=dummy, S=dummy, C=US"
            ./gradlew assemblePlayRelease :core:testPlayReleaseUnitTest -PdisablePreDex
          no_output_timeout: 1800
      
      - store_artifacts:
          path: app/build/outputs/apk
          destination: apks

      - save_cache:
          paths:
            - ~/.android
            - ~/.gradle
            - ~/android
          key: v1-android-{{ checksum "build.gradle" }}