Updated Android build tools version, which bumped minimum deployment target to API 14

Also added native code to the Android gradle project, which allows using gradle or Android Studio to build the entire SDL application without a separate ndk-build step.
This commit is contained in:
Sam Lantinga
2017-10-23 23:23:47 -07:00
parent 76cdce440c
commit edf0fae139
4 changed files with 26 additions and 71 deletions

View File

@@ -1,14 +1,19 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion 16
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "org.libsdl.app"
minSdkVersion 10
minSdkVersion 14
targetSdkVersion 16
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-14"
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -19,7 +24,11 @@ android {
}
sourceSets.main {
jniLibs.srcDir 'libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
lintOptions {
abortOnError false
@@ -27,7 +36,7 @@ android {
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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'
})

View File

@@ -6,4 +6,4 @@
APP_ABI := all
# Min SDK level
APP_PLATFORM=android-10
APP_PLATFORM=android-14