diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2021-04-26 17:05:22 +0300 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2021-04-27 19:16:28 +0300 |
commit | e1b3e85e2f10b259d4c128a5d7e406961c969cb3 (patch) | |
tree | 1fd3bf686361beb866ae8b0e925638376dd47836 /.devcontainer | |
parent | 5b5d18e93ac17efca275e1335e6f9a7a737a6d37 (diff) |
Add support for GitHub codespaces
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Diffstat (limited to '.devcontainer')
-rw-r--r-- | .devcontainer/Dockerfile | 16 | ||||
-rw-r--r-- | .devcontainer/README.md | 5 | ||||
-rw-r--r-- | .devcontainer/devcontainer.env | 3 | ||||
-rw-r--r-- | .devcontainer/devcontainer.json | 4 |
4 files changed, 28 insertions, 0 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..1da62f192 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:focal + +ARG DEBIAN_FRONTEND=noninteractive +ENV ANDROID_HOME=/usr/lib/android-sdk + +RUN apt-get update -y +RUN apt-get install -y unzip wget openjdk-8-jdk vim + +RUN wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip -O /tmp/commandlinetools.zip +RUN cd /tmp && unzip commandlinetools.zip +RUN mkdir -p /usr/lib/android-sdk/cmdline-tools/ +RUN cd /tmp/ && mv cmdline-tools/ latest/ && mv latest/ /usr/lib/android-sdk/cmdline-tools/ +RUN mkdir /usr/lib/android-sdk/licenses/ +RUN chmod -R 755 /usr/lib/android-sdk/ +RUN mkdir -p $HOME/.gradle +RUN echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 000000000..d1c77f7f5 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,5 @@ +# Instructions + +1. Start a DevContainer either on GitHub Codespaces or locally in VSCode +2. Accept all licenses by running `yes | /usr/lib/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses` +3. You can now build the app using `./gradlew clean build` diff --git a/.devcontainer/devcontainer.env b/.devcontainer/devcontainer.env new file mode 100644 index 000000000..369163cf4 --- /dev/null +++ b/.devcontainer/devcontainer.env @@ -0,0 +1,3 @@ +ANDROID_HOME=/usr/lib/android-sdk +JAVA_OPTS="-Xmx8192M" +GRADLE_OPTS="-Dorg.gradle.daemon=true" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..eb2bcab3b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "NextcloudTalkAndroid", + "dockerFile": "Dockerfile", +} |