etlegacy-libs/sdl2/android-project/app/build.gradle

64 lines
1.6 KiB
Groovy
Raw Normal View History

2018-03-20 13:33:02 +00:00
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
def buildAsApplication = !buildAsLibrary
if (buildAsApplication) {
apply plugin: 'com.android.application'
}
else {
apply plugin: 'com.android.library'
}
android {
2019-01-03 15:03:05 +00:00
compileSdkVersion 26
2018-03-20 13:33:02 +00:00
defaultConfig {
if (buildAsApplication) {
applicationId "org.libsdl.app"
}
2019-08-01 21:15:16 +00:00
minSdkVersion 16
2019-01-03 15:03:05 +00:00
targetSdkVersion 26
2018-03-20 13:33:02 +00:00
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
2019-08-01 21:15:16 +00:00
arguments "APP_PLATFORM=android-16"
2019-01-03 15:03:05 +00:00
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
2018-03-20 13:33:02 +00:00
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
}
lintOptions {
abortOnError false
}
if (buildAsLibrary) {
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith(".aar")) {
def fileName = "org.libsdl.app.aar";
output.outputFile = new File(outputFile.parent, fileName);
}
}
}
}
}
dependencies {
2019-01-03 15:03:05 +00:00
implementation fileTree(include: ['*.jar'], dir: 'libs')
2018-03-20 13:33:02 +00:00
}