Skip to content

Release 2019.10.06 #1998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Dec 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
87d099f
[recipes] Fix compilation for regex recipe
opacam Aug 15, 2019
2005508
[recipes] Update regex's recipe
opacam Aug 15, 2019
61ee55f
Merge pull request #1958 from opacam/hotfix-regex
opacam Aug 16, 2019
cb6035a
put the sdk manager command in a code block (#1956)
tshirtman Aug 17, 2019
73ff6c8
Merge pull request #1959 from kivy/release-2019.08.09
inclement Aug 19, 2019
982469a
Updated version number for develop branch following 2019.08.09 releas…
inclement Aug 19, 2019
eb84372
Fix build for case-insensitive FS and add CI test for OSX (#1951)
opacam Aug 23, 2019
c3145cf
customizability (#1869)
zworkb Aug 23, 2019
3887d2b
Initial migration to NDK r19 (Part I - The core) (#1722)
opacam Aug 24, 2019
9801865
[LIBS - PART I] Initial refactor of library recipes (#1944)
opacam Aug 25, 2019
be8566d
[NDK19] Remove `--sysroot` from LDFLAGS for cffi and pymunk (#1965)
opacam Aug 25, 2019
f6df2bd
Added libffi headers troubleshooting note to doc (#1972)
inclement Aug 26, 2019
7ec64aa
[LIBS - PART II] Part II of NDK r19 migration - Initial STL lib migra…
opacam Aug 29, 2019
129601c
[WIP][LIBS - PART III] Rework of pyleveldb, leveldb and snappy (#1966)
opacam Aug 29, 2019
9e39fbe
[WIP][LIBS - PART IV] Rework of shapely and libgeos (#1967)
opacam Aug 29, 2019
dfad9c0
[recipe-stl] Make libzmq a library recipe (#1968)
opacam Aug 29, 2019
9e93257
[recipe-stl] Rework of libtorrent and boost (#1971)
opacam Aug 29, 2019
e76aad9
Also copy the service/main.py when building with setup.py (#1936)
Aug 29, 2019
e4ed946
[recipe-stl] Rework of protobuf_cpp recipe (#1969)
opacam Aug 30, 2019
57be583
[CI] Fix CI's test for `arm64-v8a` (#1977)
opacam Sep 1, 2019
7f18efa
Updated README.md to clarify NDK versions (#1981)
Zen-CODE Sep 12, 2019
be7abe9
A bunch of tests for library recipes (#1982)
opacam Sep 14, 2019
2f98b81
Recipes tests enhancements (#1984)
opacam Sep 15, 2019
9f6d6fc
Fixes test_virtualenv and test_venv failing, closes #1994 (#1995)
AndreMiras Sep 29, 2019
01c0607
Made p4a use per-arch dist build dirs (#1986)
inclement Sep 29, 2019
a095a55
Fixes libiconv & libzbar configure host
AndreMiras Sep 29, 2019
e40260e
Updates Java version troubleshooting (#1991)
AndreMiras Sep 30, 2019
ac99e29
Merge pull request #1993 from AndreMiras/feature/fixes_libiconv_libzb…
AndreMiras Oct 5, 2019
cb403c9
Made on-device unit tests app use the develop branch by default (#1985)
inclement Oct 6, 2019
84fc28b
Updated version to 2019.10.06
inclement Oct 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ before_install:
- git remote set-branches --add origin develop
- git fetch

env:
global:
- ANDROID_SDK_HOME=/opt/android/android-sdk
- ANDROID_NDK_HOME=/opt/android/android-ndk

jobs:
include:
- &linting
Expand Down Expand Up @@ -65,19 +60,41 @@ jobs:
# case that the travis log doesn't produce any output for more than 10 minutes
- while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
script:
- docker run -e CI -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" p4a /bin/sh -c "$COMMAND"
- >
docker run
-e CI
-e TRAVIS_JOB_ID
-e TRAVIS_BRANCH
-e ANDROID_SDK_HOME="/home/user/.android/android-sdk"
-e ANDROID_NDK_HOME="/home/user/.android/android-ndk"
p4a /bin/sh -c "$COMMAND"
after_script:
# kill the background process started before run docker
- kill %1
name: Python 3 armeabi-v7a
name: Python 3 arm64-v8a
# overrides requirements to skip `peewee` pure python module, see:
# https://github.com/kivy/python-for-android/issues/1263#issuecomment-390421054
env: COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools' --arch=armeabi-v7a
env:
COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools --arch=arm64-v8a'
- <<: *testing
name: Python 3 arm64-v8a
env: COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools' --arch=arm64-v8a
name: Python 3 armeabi-v7a
os: osx
osx_image: xcode11 # since xcode1.3, python3 is the default interpreter
before_script:
# installs java 1.8, android's SDK/NDK and p4a
- make -f ci/makefiles/osx.mk
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
# Run a background process (like we do with linux tests)
- while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
script:
- >
cd testapps && python3 setup_testapp_python3_sqlite_openssl.py apk
--sdk-dir $HOME/.android/android-sdk
--ndk-dir $HOME/.android/android-ndk
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools
--arch=armeabi-v7a
- <<: *testing
name: Python 2 basic
name: Python 2 armeabi-v7a (with numpy)
env: COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python2_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements sdl2,pyjnius,kivy,python2,openssl,requests,sqlite3,setuptools,numpy'
- <<: *testing
name: Rebuild updated recipes
Expand Down
62 changes: 11 additions & 51 deletions Dockerfile.py2
Original file line number Diff line number Diff line change
Expand Up @@ -37,64 +37,17 @@ ENV RETRY="retry -t 3 --"
RUN curl https://raw.githubusercontent.com/kadwanev/retry/1.0.1/retry \
--output /usr/local/bin/retry && chmod +x /usr/local/bin/retry

ENV ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk"
ENV ANDROID_NDK_VERSION="17c"
ENV ANDROID_NDK_HOME_V="${ANDROID_NDK_HOME}-r${ANDROID_NDK_VERSION}"

# get the latest version from https://developer.android.com/ndk/downloads/index.html
ENV ANDROID_NDK_ARCHIVE="android-ndk-r${ANDROID_NDK_VERSION}-linux-x86_64.zip"
ENV ANDROID_NDK_DL_URL="https://dl.google.com/android/repository/${ANDROID_NDK_ARCHIVE}"

# download and install Android NDK
RUN ${RETRY} curl --location --progress-bar --insecure \
"${ANDROID_NDK_DL_URL}" \
--output "${ANDROID_NDK_ARCHIVE}" \
&& mkdir --parents "${ANDROID_NDK_HOME_V}" \
&& unzip -q "${ANDROID_NDK_ARCHIVE}" -d "${ANDROID_HOME}" \
&& ln -sfn "${ANDROID_NDK_HOME_V}" "${ANDROID_NDK_HOME}" \
&& rm -rf "${ANDROID_NDK_ARCHIVE}"


ENV ANDROID_SDK_HOME="${ANDROID_HOME}/android-sdk"

# get the latest version from https://developer.android.com/studio/index.html
ENV ANDROID_SDK_TOOLS_VERSION="4333796"
ENV ANDROID_SDK_BUILD_TOOLS_VERSION="28.0.2"
ENV ANDROID_SDK_TOOLS_ARCHIVE="sdk-tools-linux-${ANDROID_SDK_TOOLS_VERSION}.zip"
ENV ANDROID_SDK_TOOLS_DL_URL="https://dl.google.com/android/repository/${ANDROID_SDK_TOOLS_ARCHIVE}"

# download and install Android SDK
RUN ${RETRY} curl --location --progress-bar --insecure \
"${ANDROID_SDK_TOOLS_DL_URL}" \
--output "${ANDROID_SDK_TOOLS_ARCHIVE}" \
&& mkdir --parents "${ANDROID_SDK_HOME}" \
&& unzip -q "${ANDROID_SDK_TOOLS_ARCHIVE}" -d "${ANDROID_SDK_HOME}" \
&& rm -rf "${ANDROID_SDK_TOOLS_ARCHIVE}"

# update Android SDK, install Android API, Build Tools...
RUN mkdir --parents "${ANDROID_SDK_HOME}/.android/" \
&& echo '### User Sources for Android SDK Manager' \
> "${ANDROID_SDK_HOME}/.android/repositories.cfg"

# Download and accept Android licenses (JDK necessary!)
RUN ${RETRY} apt -y install -qq --no-install-recommends openjdk-8-jdk \
&& apt -y autoremove
RUN yes | "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;${ANDROID_SDK_BUILD_TOOLS_VERSION}" > /dev/null
RUN yes | "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "platforms;android-27" > /dev/null

# Set avdmanager permissions (executable)
RUN chmod +x "${ANDROID_SDK_HOME}/tools/bin/avdmanager"


ENV USER="user"
ENV HOME_DIR="/home/${USER}"
ENV ANDROID_HOME="${HOME_DIR}/.android"
ENV WORK_DIR="${HOME_DIR}" \
PATH="${HOME_DIR}/.local/bin:${PATH}"

# install system dependencies
RUN ${RETRY} apt -y install -qq --no-install-recommends \
python virtualenv python-pip wget lbzip2 patch sudo \
&& apt -y autoremove
&& apt -y autoremove \
&& apt -y clean

# build dependencies
# https://buildozer.readthedocs.io/en/latest/installation.html#android-on-ubuntu-16-04-64bit
Expand All @@ -113,6 +66,10 @@ RUN ${RETRY} apt -y install -qq --no-install-recommends \
&& apt -y autoremove \
&& apt -y clean

# Install Java, set JAVA_HOME (to accept android's SDK licenses) and clean
RUN ${RETRY} apt -y install -qq --no-install-recommends openjdk-8-jdk \
&& apt -y autoremove && apt -y clean
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

# prepare non root env
RUN useradd --create-home --shell /bin/bash ${USER}
Expand All @@ -124,9 +81,12 @@ RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

WORKDIR ${WORK_DIR}
COPY --chown=user:user . ${WORK_DIR}
RUN chown --recursive ${USER} ${ANDROID_SDK_HOME}
RUN mkdir ${ANDROID_HOME} && chown --recursive ${USER} ${ANDROID_HOME}
USER ${USER}

# Download and install android's NDK/SDK
RUN make -f ci/makefiles/android.mk target_os=linux

# install python-for-android from current branch
RUN virtualenv --python=python venv \
&& . venv/bin/activate \
Expand Down
61 changes: 9 additions & 52 deletions Dockerfile.py3
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

FROM ubuntu:18.04

ENV ANDROID_HOME="/opt/android"

# configure locale
RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \
locales && \
Expand All @@ -37,57 +35,9 @@ ENV RETRY="retry -t 3 --"
RUN curl https://raw.githubusercontent.com/kadwanev/retry/1.0.1/retry \
--output /usr/local/bin/retry && chmod +x /usr/local/bin/retry

ENV ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk"
ENV ANDROID_NDK_VERSION="17c"
ENV ANDROID_NDK_HOME_V="${ANDROID_NDK_HOME}-r${ANDROID_NDK_VERSION}"

# get the latest version from https://developer.android.com/ndk/downloads/index.html
ENV ANDROID_NDK_ARCHIVE="android-ndk-r${ANDROID_NDK_VERSION}-linux-x86_64.zip"
ENV ANDROID_NDK_DL_URL="https://dl.google.com/android/repository/${ANDROID_NDK_ARCHIVE}"

# download and install Android NDK
RUN ${RETRY} curl --location --progress-bar --insecure \
"${ANDROID_NDK_DL_URL}" \
--output "${ANDROID_NDK_ARCHIVE}" \
&& mkdir --parents "${ANDROID_NDK_HOME_V}" \
&& unzip -q "${ANDROID_NDK_ARCHIVE}" -d "${ANDROID_HOME}" \
&& ln -sfn "${ANDROID_NDK_HOME_V}" "${ANDROID_NDK_HOME}" \
&& rm -rf "${ANDROID_NDK_ARCHIVE}"


ENV ANDROID_SDK_HOME="${ANDROID_HOME}/android-sdk"

# get the latest version from https://developer.android.com/studio/index.html
ENV ANDROID_SDK_TOOLS_VERSION="4333796"
ENV ANDROID_SDK_BUILD_TOOLS_VERSION="28.0.2"
ENV ANDROID_SDK_TOOLS_ARCHIVE="sdk-tools-linux-${ANDROID_SDK_TOOLS_VERSION}.zip"
ENV ANDROID_SDK_TOOLS_DL_URL="https://dl.google.com/android/repository/${ANDROID_SDK_TOOLS_ARCHIVE}"

# download and install Android SDK
RUN ${RETRY} curl --location --progress-bar --insecure \
"${ANDROID_SDK_TOOLS_DL_URL}" \
--output "${ANDROID_SDK_TOOLS_ARCHIVE}" \
&& mkdir --parents "${ANDROID_SDK_HOME}" \
&& unzip -q "${ANDROID_SDK_TOOLS_ARCHIVE}" -d "${ANDROID_SDK_HOME}" \
&& rm -rf "${ANDROID_SDK_TOOLS_ARCHIVE}"

# update Android SDK, install Android API, Build Tools...
RUN mkdir --parents "${ANDROID_SDK_HOME}/.android/" \
&& echo '### User Sources for Android SDK Manager' \
> "${ANDROID_SDK_HOME}/.android/repositories.cfg"

# Download and accept Android licenses (JDK necessary!)
RUN ${RETRY} apt -y install -qq --no-install-recommends openjdk-8-jdk \
&& apt -y autoremove
RUN yes | "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;${ANDROID_SDK_BUILD_TOOLS_VERSION}" > /dev/null
RUN yes | "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "platforms;android-27" > /dev/null

# Set avdmanager permissions (executable)
RUN chmod +x "${ANDROID_SDK_HOME}/tools/bin/avdmanager"


ENV USER="user"
ENV HOME_DIR="/home/${USER}"
ENV ANDROID_HOME="${HOME_DIR}/.android"
ENV WORK_DIR="${HOME_DIR}" \
PATH="${HOME_DIR}/.local/bin:${PATH}"

Expand All @@ -114,6 +64,10 @@ RUN ${RETRY} apt -y install -qq --no-install-recommends \
&& apt -y autoremove \
&& apt -y clean

# Install Java and set JAVA_HOME (to accept android's SDK licenses)
RUN ${RETRY} apt -y install -qq --no-install-recommends openjdk-8-jdk \
&& apt -y autoremove && apt -y clean
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

# prepare non root env
RUN useradd --create-home --shell /bin/bash ${USER}
Expand All @@ -127,9 +81,12 @@ RUN pip2 install --upgrade Cython==0.28.6

WORKDIR ${WORK_DIR}
COPY --chown=user:user . ${WORK_DIR}
RUN chown --recursive ${USER} ${ANDROID_SDK_HOME}
RUN mkdir ${ANDROID_HOME} && chown --recursive ${USER} ${ANDROID_HOME}
USER ${USER}

# Download and install android's NDK/SDK
RUN make -f ci/makefiles/android.mk target_os=linux

# install python-for-android from current branch
RUN virtualenv --python=python3 venv \
&& . venv/bin/activate \
Expand Down
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,33 @@ Please refer to the LICENSE file.

## History

In 2015 these tools were rewritten to provide a new, easier to use and
extend interface. If you'd like to browse the old toolchain, its
In 2015 these tools were rewritten to provide a new, easier-to-use and
easier-to-extend interface. If you'd like to browse the old toolchain, its
status is recorded for posterity at at
https://github.com/kivy/python-for-android/tree/old_toolchain.

In the last quarter of 2018 the python recipes has been changed, the
new recipe for python3 (3.7.1) has a new build system which has been
In the last quarter of 2018 the python recipes were changed. The
new recipe for python3 (3.7.1) had a new build system which was
applied to the ancient python recipe, allowing us to bump the python2
version number to 2.7.15. This change, unifies the build process for
both python recipes, and probably solve some issues detected over the
years. Also should be mentioned that this **unified python recipes**
require to target to a **minimum api level of 21**,
*Android 5.0 - Lollipop*, so in case the you need to build targeting an
api level below 21, you must use an old version of python-for-android
(<=0.7.1). All this work has been done using android ndk version r17c,
and your build should success with that version...but be aware that the
project is in constant development so...the ndk version will change at
some time.
version number to 2.7.15. This change unified the build process for
both python recipes, and probably solved various issues detected over the
years. It should also be mentioned that these **unified python recipes**
require a **minimum target api level of 21**,
*Android 5.0 - Lollipop*, so in the case that you need to build targeting an
api level below 21, you should use an older version of python-for-android
(<=0.7.1).

Be aware that this project is in constant development so, as per time of writing,
you should use a minimum on Android's NDK r19, and ``we recommend using NDK r19b``.
This is because the toolchains installed by
default with the NDK can be used *in-place* and the python-for-android project
has been adapted for that feature. Also be aware that more recent versions of the
Android's NDK may not work.

Those mentioned changes has been done this way to make easier the transition
between python3 and python2. We will slowly phase out python2 support
towards 2020...so...if you are using python2 in your projects you should
consider to migrate it into python3.
consider migrating it into python3.

## Contributors

Expand Down
2 changes: 0 additions & 2 deletions ci/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ class TargetPython(Enum):
# IndexError: list index out of range
'secp256k1',
'ffpyplayer',
'icu',
# requires `libpq-dev` system dependency e.g. for `pg_config` binary
'psycopg2',
'protobuf_cpp',
# most likely some setup in the Docker container, because it works in host
'pyjnius', 'pyopenal',
# SyntaxError: invalid syntax (Python2)
Expand Down
68 changes: 68 additions & 0 deletions ci/makefiles/android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Downloads and installs the Android SDK depending on supplied platform: darwin or linux

# We must provide a platform (darwin or linux) and we need JAVA_HOME defined
ifndef target_os
$(error target_os is not set...aborted!)
endif

# Those android NDK/SDK variables can be override when running the file
ANDROID_NDK_VERSION ?= 19b
ANDROID_SDK_TOOLS_VERSION ?= 4333796
ANDROID_SDK_BUILD_TOOLS_VERSION ?= 28.0.2
ANDROID_HOME ?= $(HOME)/.android
ANDROID_API_LEVEL ?= 27

ANDROID_SDK_HOME=$(ANDROID_HOME)/android-sdk
ANDROID_SDK_TOOLS_ARCHIVE=sdk-tools-$(target_os)-$(ANDROID_SDK_TOOLS_VERSION).zip
ANDROID_SDK_TOOLS_DL_URL=https://dl.google.com/android/repository/$(ANDROID_SDK_TOOLS_ARCHIVE)

ANDROID_NDK_HOME=$(ANDROID_HOME)/android-ndk
ANDROID_NDK_FOLDER=$(ANDROID_HOME)/android-ndk-r$(ANDROID_NDK_VERSION)
ANDROID_NDK_ARCHIVE=android-ndk-r$(ANDROID_NDK_VERSION)-$(target_os)-x86_64.zip
ANDROID_NDK_DL_URL=https://dl.google.com/android/repository/$(ANDROID_NDK_ARCHIVE)

$(info Target install OS is : $(target_os))
$(info Android SDK home is : $(ANDROID_SDK_HOME))
$(info Android NDK home is : $(ANDROID_NDK_HOME))
$(info Android SDK download url is : $(ANDROID_SDK_TOOLS_DL_URL))
$(info Android NDK download url is : $(ANDROID_NDK_DL_URL))
$(info Android API level is : $(ANDROID_API_LEVEL))
$(info Android NDK version is : $(ANDROID_NDK_VERSION))
$(info JAVA_HOME is : $(JAVA_HOME))

all: install_sdk install_ndk

install_sdk: download_android_sdk extract_android_sdk update_android_sdk

install_ndk: download_android_ndk extract_android_ndk

download_android_sdk:
curl --location --progress-bar --continue-at - \
$(ANDROID_SDK_TOOLS_DL_URL) --output $(ANDROID_SDK_TOOLS_ARCHIVE)

download_android_ndk:
curl --location --progress-bar --continue-at - \
$(ANDROID_NDK_DL_URL) --output $(ANDROID_NDK_ARCHIVE)

# Extract android SDK and remove the compressed file
extract_android_sdk:
mkdir -p $(ANDROID_SDK_HOME) \
&& unzip -q $(ANDROID_SDK_TOOLS_ARCHIVE) -d $(ANDROID_SDK_HOME) \
&& rm -f $(ANDROID_SDK_TOOLS_ARCHIVE)


# Extract android NDK and remove the compressed file
extract_android_ndk:
mkdir -p $(ANDROID_NDK_FOLDER) \
&& unzip -q $(ANDROID_NDK_ARCHIVE) -d $(ANDROID_HOME) \
&& ln -sfn $(ANDROID_NDK_FOLDER) $(ANDROID_NDK_HOME) \
&& rm -f $(ANDROID_NDK_ARCHIVE)

# updates Android SDK, install Android API, Build Tools and accept licenses
update_android_sdk:
touch $(ANDROID_HOME)/repositories.cfg
yes | $(ANDROID_SDK_HOME)/tools/bin/sdkmanager --licenses > /dev/null
$(ANDROID_SDK_HOME)/tools/bin/sdkmanager "build-tools;$(ANDROID_SDK_BUILD_TOOLS_VERSION)" > /dev/null
$(ANDROID_SDK_HOME)/tools/bin/sdkmanager "platforms;android-$(ANDROID_API_LEVEL)" > /dev/null
# Set avdmanager permissions (executable)
chmod +x $(ANDROID_SDK_HOME)/tools/bin/avdmanager
23 changes: 23 additions & 0 deletions ci/makefiles/osx.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# installs java 1.8, android's SDK/NDK, cython and p4a

# The following variable/s can be override when running the file
ANDROID_HOME ?= $(HOME)/.android

all: install_java upgrade_cython install_android_ndk_sdk install_p4a

install_java:
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8
/usr/libexec/java_home -V

upgrade_cython:
pip3 install --upgrade Cython==0.28.6

install_android_ndk_sdk:
mkdir -p $(ANDROID_HOME)
make -f ci/makefiles/android.mk target_os=darwin JAVA_HOME=`/usr/libexec/java_home -v 1.8`

install_p4a:
# check python version and install p4a
python3 --version
pip3 install -e .
Loading