Skip to content

kaodim/android-ci-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Docker base images for Android apps compiled with Java 8

CircleCI

Android-ci-docker is a Docker images meant to serve as good bases for Android mobile apps build via CircleCI.


What's included?

Android-ci-docker is built on top of circleci images: Circle-Ci-Android.

How to use?

  1. Fork/clone the project and setup a circle ci project.
  2. Add DOCKER_USERNAME and DOCKER_PASSWORD of your Docker Hub in your Circle CI Environment Variables.
  3. Push the repo to build the custom image

How to upgrade image?

If you need to maintain different images for your project, i.e target for different Android APIs,

  1. Create a new folder android-api-{version-number}
  2. Create a new Dockerfile inside your new folder. You can copy the Dockerfile from existing folders or from Circle-Ci-Android
  3. Make sure you edit the java version to openjdk:8-jdk-slim and build-tools version for your targeted SDK.
  4. Edit your circle ci config to targetyour new folder.
...
      - checkout
      - setup_remote_docker
      - run:
          name: Setup custom environment variables
          command: |
            echo 'export ANDROID_REPO="$DOCKER_USERNAME/android-ci-api-{version-number}"' >> $BASH_ENV
      - run:
          name: Build Docker image
          command: |
            source $BASH_ENV
            export TAG=`if [ "$CIRCLE_BRANCH" == "master" ]; then echo "latest"; else echo $CIRCLE_BRANCH ; fi`
            docker build -t $ANDROID_REPO:$CIRCLE_BUILD_NUM -t $ANDROID_REPO:$TAG ./android-api-{version-number}
...
   
  1. Commit and push your changes. A new docker image will be created via Circle-Ci

About

Custom circle CI image for latest Android API versions with Java 8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published