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