Skip to content

Commit ba8e252

Browse files
committed
Bug fixes for non-aarch64 Android targets and minor enhancements.
1 parent 943d37a commit ba8e252

9 files changed

+28
-14
lines changed

docker/Dockerfile.arm-linux-androideabi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ COPY android-ndk.sh /
2727
RUN /android-ndk.sh arm
2828
ENV PATH=$PATH:/android-ndk/bin
2929

30-
COPY android-system.sh remove_android_tests.py /
30+
COPY android-system.sh /
31+
RUN mkdir -p $PYTHON_TMPDIR
32+
COPY android $PYTHON_TMPDIR
3133
RUN /android-system.sh arm
3234

3335
ENV CROSS_SYSROOT=/android-ndk/sysroot

docker/Dockerfile.armv7-linux-androideabi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ COPY android-ndk.sh /
2727
RUN /android-ndk.sh arm
2828
ENV PATH=$PATH:/android-ndk/bin
2929

30-
COPY android-system.sh remove_android_tests.py /
30+
COPY android-system.sh /
31+
RUN mkdir -p $PYTHON_TMPDIR
32+
COPY android $PYTHON_TMPDIR
3133
RUN /android-system.sh arm
3234

3335
ENV CROSS_SYSROOT=/android-ndk/sysroot

docker/Dockerfile.i686-linux-android

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN /xargo.sh
1717
# fatal runtime error: failed to initiate panic, error 5
1818
#
1919
# Running with qemu works as expected. it also ensures that're we're
20-
# running on a CPU common 32-bit x86 systems.
20+
# running on a CPU that only supports 32-bit x86 systems.
2121
COPY qemu.sh /
2222
RUN /qemu.sh i386
2323

@@ -35,7 +35,9 @@ COPY android-ndk.sh /
3535
RUN /android-ndk.sh x86
3636
ENV PATH=$PATH:/android-ndk/bin
3737

38-
COPY android-system.sh remove_android_tests.py /
38+
COPY android-system.sh /
39+
RUN mkdir -p $PYTHON_TMPDIR
40+
COPY android $PYTHON_TMPDIR
3941
RUN /android-system.sh x86
4042

4143
ENV CROSS_SYSROOT=/android-ndk/sysroot

docker/Dockerfile.thumbv7neon-linux-androideabi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ COPY android-ndk.sh /
2727
RUN /android-ndk.sh arm
2828
ENV PATH=$PATH:/android-ndk/bin
2929

30-
COPY android-system.sh remove_android_tests.py /
30+
COPY android-system.sh /
31+
RUN mkdir -p $PYTHON_TMPDIR
32+
COPY android $PYTHON_TMPDIR
3133
RUN /android-system.sh arm
3234

3335
ENV CROSS_SYSROOT=/android-ndk/sysroot

docker/Dockerfile.x86_64-linux-android

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ COPY android-ndk.sh /
2828
RUN /android-ndk.sh x86_64
2929
ENV PATH=$PATH:/android-ndk/bin
3030

31-
COPY android-system.sh remove_android_tests.py /
31+
COPY android-system.sh /
32+
RUN mkdir -p $PYTHON_TMPDIR
33+
COPY android $PYTHON_TMPDIR
3234
RUN /android-system.sh x86_64
3335

3436
ENV CROSS_SYSROOT=/android-ndk/sysroot

docker/android-ndk.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ set -euo pipefail
99
main() {
1010
local arch="${1}"
1111

12-
if [[ "${ANDROID_SDK}" -eq 25 ]]; then
13-
echo "Android SDK level 25 is not supported." 1>&2
14-
exit 1
15-
fi
16-
1712
# python3 is still needed for newer NDK versions, just since it
1813
# simplifies making symlinks even though the toolchain is prebuilt
1914
install_packages curl python python3

docker/android-system.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
# 8.1: 27 (tested at NDK r21d, 8.1.0_r81)
2020
# 9.0: 28 (tested at NDK r21d and r25b, 9.0.0_r1)
2121
# 10.0: 29 (tested at NDK r25b, 10.0.0_r47)
22-
# 11.0: 30
23-
# 12.0: 31, 32
22+
# 11.0: 30 (tested at NDK r25b, 11.0.0_r48)
23+
# 12.0: 31 (unable to build at 12.0.0_r34)
24+
# 12.1: 32 (unable to build at 12.1.0_r27)
2425
# 13.0: 33
2526
#
2627
# API level 25 seems to be missing from Android NDK versions,
@@ -128,6 +129,7 @@ main() {
128129
build_android
129130
install_android "${tools[@]}"
130131

132+
remove_java
131133
purge_packages
132134

133135
popd
@@ -183,6 +185,12 @@ EOF
183185
touch /tmp/lib/tools.jar
184186
}
185187

188+
remove_java() {
189+
rm /usr/bin/java
190+
rm /usr/bin/javac
191+
rm /tmp/lib/tools.jar
192+
}
193+
186194
build_android() {
187195
if [[ "${ANDROID_SYSTEM_COMPLETE}" != "1" ]]; then
188196
export ALLOW_MISSING_DEPENDENCIES=true

docker/android/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "android"
33
version = "0.0.0-dev.0"
44
license = { text = "MIT OR Apache-2.0" }
5-
dependencies = ["sly==0.4"]
5+
dependencies = ["sly==0.4", "google-re2==1.0"]
66

77
[build-system]
88
requires = [

docker/android/tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ isolated_build = True
66
[testenv]
77
deps =
88
sly >= 0.4
9+
google-re2 >= 1.0
910
pytest
1011
toml
1112
commands = pytest -o cache_dir={toxworkdir}/.pytest_cache

0 commit comments

Comments
 (0)