Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.15 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.15 KB

gitlab-ci-android-ndk

Docker Cloud Build Status

About

This Docker image contains the Android SDK, NDK and most common packages necessary for building Android apps in a CI tool like GitLab CI. Make sure your CI environment's caching works as expected, this greatly improves the build time, especially if you use multiple build jobs. It is based on jangrewe/gitlab-ci-android with the NDK and CMake added as additional packages.

Obligatory Docker Hub link.

Usage

A .gitlab-ci.yml with caching of your project's dependencies would look like this:

image: mmr42/gitlab-ci-android-ndk:latest

variables:
  GRADLE_OPTS: "-Dorg.gradle.daemon=false"

before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew

cache:
  key: ${CI_COMMIT_REF_NAME}
  paths:
  - .gradle/

stages:
  - build

build:
  stage: build
  script:
  - ./gradlew assembleDebug
  artifacts:
    paths:
    - app/build/outputs/apk/*.apk