mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
6e01fbb763
We're increasing the Android SDK minimum version to API 19, this doesn't increase the minimum target API, which is API 14.
69 lines
1.9 KiB
Groovy
69 lines
1.9 KiB
Groovy
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
|
|
def buildAsApplication = !buildAsLibrary
|
|
if (buildAsApplication) {
|
|
apply plugin: 'com.android.application'
|
|
}
|
|
else {
|
|
apply plugin: 'com.android.library'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 19
|
|
buildToolsVersion "26.0.1"
|
|
defaultConfig {
|
|
if (buildAsApplication) {
|
|
applicationId "org.libsdl.app"
|
|
}
|
|
minSdkVersion 14
|
|
targetSdkVersion 19
|
|
versionCode 1
|
|
versionName "1.0"
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
arguments "APP_PLATFORM=android-14"
|
|
}
|
|
}
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
}
|
|
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 {
|
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
|
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
})
|
|
testCompile 'junit:junit:4.12'
|
|
}
|