mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 08:31:04 +02:00
e203f7ae4c
Again, two changes. First change is to add "arm64-v8a" to NDK abiFilters. This is needed to really generate ARM64 binaries inside the APK. The second change is to exclude libSDL2.so from the resulting APK. Since LOVE statically links with SDL2, then there's no reason to have libSDL2.so lying around inside the APK. It's also save the APK size a little bit.
58 lines
1.7 KiB
Groovy
58 lines
1.7 KiB
Groovy
apply plugin: 'com.android.library'
|
|
|
|
android {
|
|
// If you want to use the debugger for JNI code, you want to debug this lib-project in Debug!
|
|
// And due to gradle limitations/bugs, the best way is to always debug it in debug.
|
|
// See https://code.google.com/p/android/issues/detail?id=52962
|
|
// and http://stackoverflow.com/questions/27277433/why-does-gradle-build-my-module-in-release-mode-when-the-app-is-in-debug
|
|
// defaultPublishConfig "debug"
|
|
compileSdkVersion 28
|
|
buildToolsVersion '28.0.3'
|
|
|
|
defaultConfig {
|
|
compileSdkVersion 28
|
|
buildToolsVersion "28.0.3"
|
|
minSdkVersion 14
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
arguments "-j4"
|
|
}
|
|
}
|
|
ndk {
|
|
// Specifies the ABI configurations of your native
|
|
// libraries Gradle should build and package with your APK.
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDirs('src/main/java', 'src/jni/SDL2-2.0.9/android-project/app/src/main/java')
|
|
}
|
|
}
|
|
}
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
path "src/jni/Android.mk"
|
|
}
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
packagingOptions {
|
|
exclude 'lib/arm64-v8a/libSDL2.so'
|
|
exclude 'lib/armeabi-v7a/libSDL2.so'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
|
api 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
|
}
|