improve Makefile and add red warning for missing YESACCEPT=y

This commit is contained in:
Alexander Mahr 2024-10-09 09:16:28 +02:00
parent 703e34f0b4
commit b9b9e32b8b
2 changed files with 2 additions and 1 deletions

View file

@ -19,6 +19,7 @@ ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk/"
#ENTRYPOINT bash -c 'sleep 10000' #ENTRYPOINT bash -c 'sleep 10000'
ENV LIBRARY_PATH="$LIBRARY_PATH:$BUILD_TOOLS_LATEST/lib" ENV LIBRARY_PATH="$LIBRARY_PATH:$BUILD_TOOLS_LATEST/lib"
ARG YESACCEPT=n ARG YESACCEPT=n
RUN test "$YESACCEPT" = "y" || { printf "\033[31;1;4m%s\n%s\033[0m " "FAILED TO BUILD CONTAINER: You did not ACCEPT THE UPSTREAM LICENSE" " -> export YESACCEPT=y" >&2; exit 1; }
RUN echo you selected to accept the licenses/TOS RUN echo you selected to accept the licenses/TOS
RUN echo "$YESACCEPT" | sdkmanager --install "build-tools;33.0.2" RUN echo "$YESACCEPT" | sdkmanager --install "build-tools;33.0.2"
RUN echo "$YESACCEPT" | sdkmanager --install "platforms;android-33" RUN echo "$YESACCEPT" | sdkmanager --install "platforms;android-33"

View file

@ -4,7 +4,7 @@ all: build install
build: build:
docker-compose run --rm compile docker-compose run --rm compile
ln -sv apk/bin/example.app.apk ./ ln -sf apk/bin/example.app.apk ./; test -e ./example.app.apk || rm ./example.app.apk
install: install:
adb install -r ./example.app.apk adb install -r ./example.app.apk