diff --git a/build.sh b/build.sh deleted file mode 100755 index a2b80be..0000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo $PWD diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..c413001 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,38 @@ +#FROM gradle:8-alpine +FROM gradle:8-jammy +#FROM alpine:latest + +ENV CLI_TOOLS_VERSION=9477386 +ENV CLI_TOOLS_HASH=bd1aa17c7ef10066949c88dc6c9c8d536be27f992a1f3b5a584f9bd2ba5646a0 +ENV CLI_TOOLS_FILENAME="commandlinetools-liunx.zip" + +ENV ANDROID_HOME="/sdk" + +RUN apt-get update && apt-get install git curl +#RUN apk update +#RUN apk add bash git curl +#RUN apk add openjdk17 + +RUN mkdir /sdk +WORKDIR /sdk + +COPY licenses ./licenses + +RUN mkdir cmdline-tools +WORKDIR cmdline-tools + +RUN curl "https://dl.google.com/android/repository/commandlinetools-linux-${CLI_TOOLS_VERSION}_latest.zip" --output "$CLI_TOOLS_FILENAME" +RUN echo "$CLI_TOOLS_HASH $CLI_TOOLS_FILENAME" > "${CLI_TOOLS_FILENAME}.sha256" +RUN cat "${CLI_TOOLS_FILENAME}.sha256" +RUN sha256sum $CLI_TOOLS_FILENAME | sha256sum -c +RUN unzip $CLI_TOOLS_FILENAME +RUN mv cmdline-tools latest + +WORKDIR /sdk +#RUN ./cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33" +#RUN ./cmdline-tools/latest/bin/sdkmanager "build-tools" + + +COPY build.sh / + +CMD ["/bin/bash", "/build.sh"] diff --git a/build/build.sh b/build/build.sh new file mode 100755 index 0000000..bcbdd64 --- /dev/null +++ b/build/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -euxo pipefail + +mkdir /work +cd /work + +REPO_URL="https://github.com/daneren2005/Subsonic.git" +#REPO_URL="https://github.com/vector-im/element-android.git" + +git clone $REPO_URL repo --recurse-submodules +cd repo || exit + +/bin/bash diff --git a/build/licenses/android-googletv-license b/build/licenses/android-googletv-license new file mode 100644 index 0000000..07d43f0 --- /dev/null +++ b/build/licenses/android-googletv-license @@ -0,0 +1,2 @@ + +601085b94cd77f0b54ff86406957099ebe79c4d6 \ No newline at end of file diff --git a/build/licenses/android-sdk-arm-dbt-license b/build/licenses/android-sdk-arm-dbt-license new file mode 100644 index 0000000..0dc9cc0 --- /dev/null +++ b/build/licenses/android-sdk-arm-dbt-license @@ -0,0 +1,2 @@ + +859f317696f67ef3d7f30a50a5560e7834b43903 \ No newline at end of file diff --git a/build/licenses/android-sdk-license b/build/licenses/android-sdk-license new file mode 100644 index 0000000..b8d7962 --- /dev/null +++ b/build/licenses/android-sdk-license @@ -0,0 +1,2 @@ + +24333f8a63b6825ea9c5514f83c2829b004d1fee \ No newline at end of file diff --git a/build/licenses/android-sdk-preview-license b/build/licenses/android-sdk-preview-license new file mode 100644 index 0000000..da4552d --- /dev/null +++ b/build/licenses/android-sdk-preview-license @@ -0,0 +1,2 @@ + +84831b9409646a918e30573bab4c9c91346d8abd \ No newline at end of file diff --git a/build/licenses/google-gdk-license b/build/licenses/google-gdk-license new file mode 100644 index 0000000..db3b42f --- /dev/null +++ b/build/licenses/google-gdk-license @@ -0,0 +1,2 @@ + +33b6a2b64607f11b759f320ef9dff4ae5c47d97a \ No newline at end of file diff --git a/build/licenses/mips-android-sysimage-license b/build/licenses/mips-android-sysimage-license new file mode 100644 index 0000000..8f4f164 --- /dev/null +++ b/build/licenses/mips-android-sysimage-license @@ -0,0 +1,2 @@ + +e9acab5b5fbb560a72cfaecce8946896ff6aab9d \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..9bb423e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -euxo pipefail + +UUID=$(uuidgen) + +cd build || exit +docker build . -t "$UUID:latest" +docker run -it "$UUID:latest"