Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 801b8847 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Update readme

Adds instructions on how to change java version or use a different
docker image
parent 2dd9412f
Loading
Loading
Loading
Loading
Loading
+49 −1
Original line number Diff line number Diff line
@@ -6,4 +6,52 @@ docker-android-apps-cicd is an open-source fork of [gitlab-ci-android](https://g

- A the list of contributors can be viewed on this repository's [contributors graph](https://gitlab.e.foundation/e/apps/docker-android-apps-cicd/-/graphs/master).

## How to add docker images to projects

This repo contains 3 images slim, full and chromium. 

The slim image is small in size and can be used for tasks like updating projects from upstream, running rsync tasks, etc. As those tasks doesn't need many packages therefore slim docker image can be used

The full image is used to build android apps. So it contains packages like python, java and android sdk.

The chromium image is used to build our browser.

To add it to the project for use add one of the following changes according to requirements to .gitlab-ci.yml file

```
image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:slim-latest
image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest
image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:chromium-latest
```

To use changes which are not from master branch change latest to branch name or use commit sha

## Change java in projects

Different android projects require different java version to compile the app. So you can just change the JAVA_HOME variable to use a specific java version in android projects. So just export the java version in the gitlab ci of the android project. Java 17 is the default version so nothing needs to be done for it

### For Java 8

```
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
```

### For Java 11

```
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
```

### For Java 17

```
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
```

### For Java 21

```
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
```

In case you wish to contribute to the development of this project, feel free to open a [Merge Request](https://gitlab.e.foundation/e/apps/docker-android-apps-cicd/-/merge_requests) or an [Issue](https://gitlab.e.foundation/e/backlog/-/issues/) for the same. Contributions are always welcome.