Skip to content

Instantly share code, notes, and snippets.

@bvlion
Created March 7, 2024 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvlion/25d4a842fa2c0c36902edfa24df42a75 to your computer and use it in GitHub Desktop.
Save bvlion/25d4a842fa2c0c36902edfa24df42a75 to your computer and use it in GitHub Desktop.
Pipelines to CircleCI
image: uber/android-build-environment:latest
pipelines:
branches:
master:
- step:
script:
- mkdir -p "$ANDROID_HOME/licenses"
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" >> "$ANDROID_HOME/licenses/android-sdk-preview-license"
- echo -e "\nd975f751698a77b662f1254ddbeed3901e976f5a" >> "$ANDROID_HOME/licenses/intel-android-extra-license"
- echo y | android update sdk --no-ui -a
- bash gradlew clean assembleRelease
version: 2
jobs:
build:
branches:
only:
- master
docker:
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- run:
name: SetUp Build
command: chmod 755 gradlew
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: gradle dependencies
command: ./gradlew androidDependencies
- save_cache:
paths: ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Build apk
command: ./gradlew :app:assembleRelease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment