From ece34c91ef44f59e14376ad6362c767229b3b4a0 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Tue, 19 Jun 2018 23:31:11 +0200 Subject: [PATCH] Updates Dockerfile workaround #625 and README.rst, fixes #589 --- Dockerfile | 9 ++++++++- README.rst | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0e9192cca..3bfb29ba7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ ENV LANG="en_US.UTF-8" \ # installs system dependencies (required to setup all the tools) RUN apt install -qq --yes --no-install-recommends \ - sudo python-pip python-setuptools + sudo python-pip python-setuptools file # https://buildozer.readthedocs.io/en/latest/installation.html#android-on-ubuntu-18-04-64bit RUN dpkg --add-architecture i386 && apt update -qq > /dev/null && \ @@ -45,4 +45,11 @@ WORKDIR ${WORK_DIR} # installs buildozer and dependencies RUN pip install --user Cython==0.25.2 buildozer +# calling buildozer adb command should trigger SDK/NDK first install and update +# but it requires a buildozer.spec file +RUN cd /tmp/ && buildozer init && buildozer android adb -- version && cd - +# fixes source and target JDK version, refs https://github.com/kivy/buildozer/issues/625 +RUN sed s/'name="java.source" value="1.5"'/'name="java.source" value="7"'/ -i ${HOME_DIR}/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml +RUN sed s/'name="java.target" value="1.5"'/'name="java.target" value="7"'/ -i ${HOME_DIR}/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml + ENTRYPOINT ["buildozer"] diff --git a/README.rst b/README.rst index 18046afa0..ecdad884c 100644 --- a/README.rst +++ b/README.rst @@ -76,6 +76,20 @@ The pip package does not yet support python3. #. Please note the "android" buildozer target, and use that for any and all buildozer commands you run (even if the docs just say "android"). +Buildozer Docker image +---------------------- + +A Dockerfile is available to use buildozer through a Docker environment. + +#. Build with:: + + docker build --tag=buildozer . + +#. Run with:: + + docker run --volume "$(pwd)":/home/user/hostcwd buildozer --version + + Examples of Buildozer commands: --------------------------------