Skip to content

build: update the ndk version for android to 29 beta2 #229

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 5 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Setup NDK
run: |
sdkmanager --install "ndk;29.0.13113456"
sdkmanager --install "ndk;29.0.13599879"

- name: Build native libraries
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,17 @@ jobs:
with:
msystem: ${{matrix.config.environment == 'mingw' && 'MINGW64' || 'UCRT64'}}
# gcc-libs 14 don't provbide the virtual package cc-libs, only gcc-libs 15 (see https://github.com/msys2/MINGW-packages/commit/9fa882f7eb6f639780a13df016497a93e45544ac) provide it, so until we use gcc 15, nghttp3 < 1.10.1 needs to be used (see https://github.com/msys2/MINGW-packages/commit/16b7f94772f29f1c207764701d863d266a5de64c) since 1.10.1 needs cc-libs and not gcc-libs. The newest version matching that constraint is 1.9.0
# for the other pavckages see https://github.com/msys2/MINGW-packages/commit/62308009e77d772a126313626b194e503b0e5135
install: |
nghttp3=1.9
SDL2=2.32.4
aom=3.12.0
curl=8.13.0
gnutls=3.8.8
libarchive=3.7.9
mpg123=1.32.9
ngtcp2=1.12.0
python=3.12.9-4
gcc=14 gcc-libs=!

- name: Setup Clang (Linux) (libc++)
Expand Down
1 change: 1 addition & 0 deletions platforms/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
app/build/
app/.cxx
/local.properties
build/reports/
2 changes: 1 addition & 1 deletion platforms/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ android {
}

compileSdkVersion 35
ndkVersion "29.0.13113456"
ndkVersion "29.0.13599879"
defaultConfig {
if (buildAsApplication) {
applicationId "com.github.oopetris"
Expand Down
2 changes: 1 addition & 1 deletion platforms/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
classpath 'com.android.tools.build:gradle:8.10.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions platforms/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Oct 02 13:43:32 CEST 2024
#Tue Jun 10 18:14:41 CEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 5 additions & 0 deletions platforms/build-3ds.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash

# Exit immediately if a command exits with a non-zero status.
set -e
## Treat undefined variables as an error
set -u
# fails if any part of a pipeline (|) fails
set -o pipefail

## options: "smart, complete_rebuild"
export COMPILE_TYPE="smart"
Expand Down
18 changes: 12 additions & 6 deletions platforms/build-android.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/usr/bin/env bash

# Exit immediately if a command exits with a non-zero status.
set -e
## Treat undefined variables as an error
set -u
# fails if any part of a pipeline (|) fails
set -o pipefail

if [ ! -d "toolchains" ]; then
mkdir -p toolchains
fi

export NDK_VER_DOWNLOAD="r29-beta1"
export NDK_VER_DESC="r29-beta1"
export NDK_VER_DOWNLOAD="r29-beta2"
export NDK_VER_DESC="r29-beta2"

export BASE_PATH="$PWD/toolchains/android-ndk-$NDK_VER_DESC"
export ANDROID_NDK_HOME="$BASE_PATH"
Expand All @@ -19,6 +24,7 @@ if [ ! -d "$BASE_PATH" ]; then

if [ ! -e "android-ndk-$NDK_VER_DOWNLOAD-linux.zip" ]; then

echo "Downloading android NDK $NDK_VER_DESC"
wget -q "https://dl.google.com/android/repository/android-ndk-$NDK_VER_DOWNLOAD-linux.zip"
fi
unzip -q "android-ndk-$NDK_VER_DOWNLOAD-linux.zip"
Expand All @@ -40,7 +46,8 @@ if [ ! -e "$BASE_PATH/meta/platforms.json" ]; then

fi

export SDK_VERSION=$(jq '.max' -M -r -c "$BASE_PATH/meta/platforms.json")
SDK_VERSION=$(jq '.max' -M -r -c "$BASE_PATH/meta/platforms.json")
export SDK_VERSION

mapfile -t ARCH_KEYS < <(jq 'keys' -M -r -c "$BASE_PATH/meta/abis.json" | tr -d '[]"' | sed 's/,/\n/g')

Expand Down Expand Up @@ -117,7 +124,7 @@ for INDEX in "${ARCH_KEYS_INDEX[@]}"; do
ARM_TARGET_ARCH=$KEY
ARM_TRIPLE=$ARM_NAME_TRIPLE$SDK_VERSION
ARM_COMPILER_TRIPLE=$(echo "$RAW_JSON" | jq -M -r -c '."llvm_triple"')
ARM_TOOL_TRIPLE=$(echo "$ARM_NAME_TRIPLE$SDK_VERSION" | sed s/$ARCH/$ARCH_VERSION/)
ARM_TOOL_TRIPLE=$(echo "$ARM_NAME_TRIPLE$SDK_VERSION" | sed "s/$ARCH/$ARCH_VERSION/")

export SYM_LINK_PATH=sym-$ARCH_VERSION

Expand Down Expand Up @@ -396,7 +403,7 @@ llvm-config = '$LLVM_CONFIG'
c_std = 'gnu11'
cpp_std = 'c++23'
c_args = [$COMPILE_FLAGS]
cpp_args = [$COMPILE_FLAGS]
cpp_args = [$COMPILE_FLAGS]
c_link_args = [$LINK_FLAGS]
cpp_link_args = [$LINK_FLAGS]

Expand Down Expand Up @@ -438,7 +445,6 @@ EOF

if [ "$COMPILE_TYPE" == "complete_rebuild" ] || [ ! -e "$BUILD_DIR" ]; then

# TODO: enbale hidapi, by not dependening on libusb, that is not availbale on android
meson setup "$BUILD_DIR" \
"--prefix=$SYS_ROOT" \
"--wipe" \
Expand Down
5 changes: 5 additions & 0 deletions platforms/build-switch.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash

# Exit immediately if a command exits with a non-zero status.
set -e
## Treat undefined variables as an error
set -u
# fails if any part of a pipeline (|) fails
set -o pipefail

## options: "smart, complete_rebuild"
export COMPILE_TYPE="smart"
Expand Down
8 changes: 7 additions & 1 deletion platforms/build-web.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash

# Exit immediately if a command exits with a non-zero status.
set -e
## Treat undefined variables as an error
set -u
# fails if any part of a pipeline (|) fails
set -o pipefail

## options: "smart, complete_rebuild"
export COMPILE_TYPE="smart"
Expand Down Expand Up @@ -44,7 +49,8 @@ if [ ! -d "toolchains" ]; then
mkdir -p toolchains
fi

export EMSCRIPTEN_ROOT="$(pwd)/toolchains/emsdk"
EMSCRIPTEN_ROOT="$(pwd)/toolchains/emsdk"
export EMSCRIPTEN_ROOT

export EMSCRIPTEN_RELEASE_TAG="4.0.8"

Expand Down
Loading