This repository was archived by the owner on May 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +28
-24
lines changed Expand file tree Collapse file tree 5 files changed +28
-24
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,18 @@ RUN apt-get install -y \
32
32
# JDK 17
33
33
RUN apt-get install -y openjdk-17-jdk
34
34
35
-
36
35
WORKDIR /home
37
36
37
+
38
+ # NDK install
39
+ ENV NDK_VERSION r25c
40
+ ENV ANDROID_NDK_HOME /home/android-ndk-$NDK_VERSION
41
+ RUN \
42
+ wget -nc -nv -O android-ndk-$NDK_VERSION-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux.zip" \
43
+ && unzip -q android-ndk-$NDK_VERSION-linux-x86_64.zip \
44
+ && rm android-ndk-$NDK_VERSION-linux-x86_64.zip
45
+
46
+
47
+
48
+
38
49
COPY . .
Original file line number Diff line number Diff line change 5
5
export JDK_DEBUG_LEVEL=release
6
6
7
7
if [[ " $BUILD_IOS " != " 1" ]]; then
8
- wget -nc -nv -O android-ndk-$NDK_VERSION -linux-x86_64.zip " https://dl.google.com/android/repository/android-ndk-$NDK_VERSION -linux.zip"
9
- ./extractndk.sh
10
- ./maketoolchain.sh
8
+ if [[ -d " $ANDROID_NDK_HOME " ]]; then
9
+ echo " NDK already exists: $ANDROID_NDK_HOME "
10
+ else
11
+ echo " Downloading NDK"
12
+ wget -nc -nv -O android-ndk-$NDK_VERSION -linux-x86_64.zip " https://dl.google.com/android/repository/android-ndk-$NDK_VERSION -linux.zip"
13
+ unzip -q android-ndk-$NDK_VERSION -linux-x86_64.zip
14
+ fi
15
+ cp devkit.info.${TARGET_SHORT} ${TOOLCHAIN}
11
16
else
12
17
chmod +x ios-arm64-clang
13
18
chmod +x ios-arm64-clang++
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -44,19 +44,21 @@ if [[ "$BUILD_IOS" == "1" ]]; then
44
44
else
45
45
46
46
export JVM_PLATFORM=linux
47
- # Set NDK
48
47
export API=21
49
- export NDK=$PWD /android-ndk-$NDK_VERSION
50
- export ANDROID_NDK_ROOT=$NDK
51
- # export TOOLCHAIN=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
52
- export TOOLCHAIN=$NDK /toolchains/llvm/prebuilt/linux-x86_64
48
+
49
+ # Runners usually ship with a recent NDK already
50
+ if [[ -z " $ANDROID_NDK_HOME " ]]
51
+ then
52
+ export ANDROID_NDK_HOME=$PWD /android-ndk-$NDK_VERSION
53
+ fi
54
+
55
+ export TOOLCHAIN=$ANDROID_NDK_HOME /toolchains/llvm/prebuilt/linux-x86_64
53
56
54
57
export ANDROID_INCLUDE=$TOOLCHAIN /sysroot/usr/include
55
58
56
59
57
60
# If I'm right it should only need the dummy libs
58
61
export CPPFLAGS=" -I$ANDROID_INCLUDE -I$ANDROID_INCLUDE /$TARGET " # -I/usr/include -I/usr/lib
59
- # export LDFLAGS="-L$NDK/platforms/android-$API/arch-$TARGET_SHORT/usr/lib"
60
62
export CPPFLAGS=" "
61
63
export LDFLAGS=" "
62
64
You can’t perform that action at this time.
0 commit comments