android-project/app/build.gradle
author Sam Lantinga <slouken@libsdl.org>
Mon, 23 Oct 2017 23:23:47 -0700
changeset 11649 fe6769530709
parent 11647 5816b27073a4
child 11854 934d77867168
permissions -rw-r--r--
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.
     1 apply plugin: 'com.android.application'
     2 
     3 android {
     4     compileSdkVersion 16
     5     buildToolsVersion "26.0.1"
     6     defaultConfig {
     7         applicationId "org.libsdl.app"
     8         minSdkVersion 14
     9         targetSdkVersion 16
    10         versionCode 1
    11         versionName "1.0"
    12         externalNativeBuild {
    13             ndkBuild {
    14                 arguments "APP_PLATFORM=android-14"
    15             }
    16         }
    17         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    18     }
    19     buildTypes {
    20         release {
    21             minifyEnabled false
    22             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    23         }
    24     }
    25     sourceSets.main {
    26         jniLibs.srcDir 'libs'
    27     }
    28     externalNativeBuild {
    29         ndkBuild {
    30             path 'jni/Android.mk'
    31         }
    32     }
    33     lintOptions {
    34         abortOnError false
    35     }
    36 }
    37 
    38 dependencies {
    39     compile fileTree(include: ['*.jar'], dir: 'libs')
    40     androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    41         exclude group: 'com.android.support', module: 'support-annotations'
    42     })
    43     testCompile 'junit:junit:4.12'
    44 }