Skip to content

Latest commit

 

History

History
69 lines (65 loc) · 1.91 KB

build.gradle

File metadata and controls

69 lines (65 loc) · 1.91 KB
 
Jan 10, 2018
Jan 10, 2018
1
2
3
4
5
6
7
8
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
def buildAsApplication = !buildAsLibrary
if (buildAsApplication) {
apply plugin: 'com.android.application'
}
else {
apply plugin: 'com.android.library'
}
Aug 22, 2018
Aug 22, 2018
11
compileSdkVersion 26
Oct 24, 2017
Oct 24, 2017
12
buildToolsVersion "26.0.1"
13
defaultConfig {
Jan 10, 2018
Jan 10, 2018
14
15
16
if (buildAsApplication) {
applicationId "org.libsdl.app"
}
Oct 24, 2017
Oct 24, 2017
17
minSdkVersion 14
Aug 22, 2018
Aug 22, 2018
18
targetSdkVersion 26
19
20
versionCode 1
versionName "1.0"
Oct 24, 2017
Oct 24, 2017
21
22
23
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-14"
Aug 21, 2018
Aug 21, 2018
24
abiFilters 'armeabi-v7a', 'x86'
Oct 24, 2017
Oct 24, 2017
25
26
}
}
27
28
29
30
31
32
33
34
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Jan 10, 2018
Jan 10, 2018
35
36
37
38
39
40
41
42
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
Oct 24, 2017
Oct 24, 2017
43
}
Jan 10, 2018
Jan 10, 2018
44
45
46
47
48
}
lintOptions {
abortOnError false
}
Jan 10, 2018
Jan 10, 2018
49
50
51
52
53
54
55
56
57
58
59
60
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);
}
}
}
}
61
62
63
}
dependencies {
Oct 24, 2017
Oct 24, 2017
64
compile fileTree(include: ['*.jar'], dir: 'libs')
65
66
67
68
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
Feb 12, 2018
Feb 12, 2018
69
}