Files
mtgodot-poc/android-native/app/build.gradle
T
shenleiandClaude Opus 5.5 fd051cc3ed android-native: SDL3 APK build for the native client
build-android-native.sh downloads SDL 3.4.16 (sha256-checked), builds
libSDL3.so and libmain.so (native_render + port_platform + embedded
Python) at API 24, and wraps them in the SDLActivity shell under
android-native/ (package org.metin2port.client). push-android-client.sh
copies the 40250 Client directory into the app's files/ with run-as
(--locale XX selects locale_XX.cfg). port_logic links with
--no-dependent-libraries on ELF targets so the verbatim
`#pragma comment(lib, ...)` lines do not break lld.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:45:58 +09:00

40 lines
1.2 KiB
Groovy

// SDLActivity shell around native_render (libmain.so). The native libraries, the SDL Java sources
// and the assets come from ../build-android-native, produced by ../build-android-native.sh.
plugins {
id 'com.android.application'
}
def nativeBuild = file("${rootDir}/../build-android-native")
android {
namespace = 'org.metin2port.client'
compileSdk 35
defaultConfig {
applicationId 'org.metin2port.client'
minSdk 24
targetSdk 35
versionCode 1
versionName '0.1'
ndk { abiFilters 'arm64-v8a' }
}
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.debug
}
}
sourceSets.main {
java.srcDirs += "${nativeBuild}/_deps/SDL3-3.4.16/android-project/app/src/main/java"
jniLibs.srcDirs = ["${nativeBuild}/jniLibs"]
assets.srcDirs = ["${nativeBuild}/app-build/native_render/android-assets"]
}
packagingOptions {
jniLibs { useLegacyPackaging = true }
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
lint { abortOnError = false }
}