Skip to content

Latest commit

 

History

History
71 lines (67 loc) · 1.96 KB

build.gradle

File metadata and controls

71 lines (67 loc) · 1.96 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
12
defaultConfig {
Jan 10, 2018
Jan 10, 2018
13
14
15
if (buildAsApplication) {
applicationId "org.libsdl.app"
}
Jan 16, 2019
Jan 16, 2019
16
minSdkVersion 16
Aug 22, 2018
Aug 22, 2018
17
targetSdkVersion 26
18
19
versionCode 1
versionName "1.0"
Oct 24, 2017
Oct 24, 2017
20
21
externalNativeBuild {
ndkBuild {
Jan 16, 2019
Jan 16, 2019
22
arguments "APP_PLATFORM=android-16"
Oct 28, 2018
Oct 28, 2018
23
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
Oct 24, 2017
Oct 24, 2017
24
}
Aug 11, 2019
Aug 11, 2019
25
26
27
28
29
// cmake {
// arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
// abiFilters 'arm64-v8a'
// }
Oct 24, 2017
Oct 24, 2017
30
}
31
32
33
34
35
36
37
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Jan 10, 2018
Jan 10, 2018
38
39
40
41
42
43
44
45
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
Aug 11, 2019
Aug 11, 2019
46
47
48
// cmake {
// path 'jni/CMakeLists.txt'
// }
Oct 24, 2017
Oct 24, 2017
49
}
Jan 10, 2018
Jan 10, 2018
50
51
52
53
54
}
lintOptions {
abortOnError false
}
Jan 10, 2018
Jan 10, 2018
55
56
57
58
59
60
61
62
63
64
65
66
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);
}
}
}
}
67
68
69
}
dependencies {
Oct 28, 2018
Oct 28, 2018
70
implementation fileTree(include: ['*.jar'], dir: 'libs')
Feb 12, 2018
Feb 12, 2018
71
}