mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00

This reverts commit edef6e66e9
If you need to support the Google Play 16 kiB page size requirement, the recommendation is to use NDK r28c or newer, which automatically aligns binaries correctly.
63 lines
1.6 KiB
Groovy
63 lines
1.6 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
}
|
|
|
|
def buildWithCMake = project.hasProperty('BUILD_WITH_CMAKE');
|
|
|
|
android {
|
|
namespace = "org.libsdl.app"
|
|
compileSdkVersion 35
|
|
defaultConfig {
|
|
minSdkVersion 21
|
|
targetSdkVersion 35
|
|
versionCode 1
|
|
versionName "1.0"
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
arguments "APP_PLATFORM=android-21"
|
|
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
abiFilters 'arm64-v8a'
|
|
}
|
|
cmake {
|
|
arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static"
|
|
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
abiFilters 'arm64-v8a'
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
applicationVariants.all { variant ->
|
|
tasks["merge${variant.name.capitalize()}Assets"]
|
|
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
|
|
}
|
|
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
|
sourceSets.main {
|
|
jniLibs.srcDir 'libs'
|
|
}
|
|
externalNativeBuild {
|
|
if (buildWithCMake) {
|
|
cmake {
|
|
path 'jni/CMakeLists.txt'
|
|
}
|
|
} else {
|
|
ndkBuild {
|
|
path 'jni/Android.mk'
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
lint {
|
|
abortOnError = false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
}
|