mirror of https://github.com/libsdl-org/SDL
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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 34
|
|
defaultConfig {
|
|
minSdkVersion 19
|
|
targetSdkVersion 34
|
|
versionCode 1
|
|
versionName "1.0"
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
arguments "APP_PLATFORM=android-19"
|
|
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
abiFilters 'arm64-v8a'
|
|
}
|
|
cmake {
|
|
arguments "-DANDROID_PLATFORM=android-19", "-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')
|
|
}
|