5fe4cdf7f8
build / build (push) Successful in 2m21s
Every .so this project builds was already ELF-segment-aligned for 16 KB pages (build-image/Dockerfile's ANDROID_16KB_LDFLAGS, app/build.gradle's own CMAKE_SHARED_LINKER_FLAGS), but AGP 8.1.1 doesn't align native libraries' zip entries within the APK itself - that only became automatic in AGP 8.5.1, which is what Android Studio's "not compatible with 16 KB devices" warning was actually flagging. No build-image changes needed: Gradle/AGP are resolved over the network at build time, not baked into the image.
37 lines
1.3 KiB
Groovy
37 lines
1.3 KiB
Groovy
// Top-level Gradle build file. Adapted from SDL2's own android-project
|
|
// template (see app/src/main/java/org/libsdl/app/, copied from the same
|
|
// template). Unlike the C/SDL2 desktop build, this needs network access
|
|
// at build time for Gradle/AGP's own dependency resolution - see
|
|
// build-apk.sh.
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
dependencies {
|
|
// 8.5.1+ needed for AGP to automatically 16 KB-align native
|
|
// libraries' zip entries within the APK - the actual .so's are
|
|
// already ELF-segment-aligned for this regardless of AGP version
|
|
// (see build-image/Dockerfile's ANDROID_16KB_LDFLAGS and
|
|
// app/build.gradle's own CMAKE_SHARED_LINKER_FLAGS), but that alone
|
|
// doesn't get them 16 KB-aligned *within the APK's zip*, which is
|
|
// what Android Studio's "not compatible with 16 KB devices"
|
|
// warning is actually about. Needs Gradle 8.7+ (see
|
|
// gradle/wrapper/gradle-wrapper.properties) and JDK 17 in whatever
|
|
// runs gradlew (already the case - see build-image/Dockerfile's
|
|
// openjdk-17-jdk-headless).
|
|
classpath 'com.android.tools.build:gradle:8.5.2'
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
}
|