-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
67 lines (55 loc) · 1.57 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
ext.versionCodes = ['armeabi-v7a': 2, 'arm64-v8a': 3, 'x86': 8, 'x86_64': 9]
import com.android.build.OutputFile
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 15
targetSdkVersion 30
versionCode 212
versionName "2.1.2"
archivesBaseName = "GobandroidAIGnuGo-$versionName"
}
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
splits {
abi {
enable true // enable ABI split feature to create one APK per ABI
universalApk false //generate an additional APK that targets all the ABIs
reset()
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
output.versionCodeOverride =
project.ext.versionCodes.get(output.getFilter(OutputFile.ABI), 0) * 1000000 + android.defaultConfig.versionCode
}
}
/*
// call regular ndk-build(.cmd)ol script from app directory
task ndkBuild(type: Exec) {
commandLine 'ndk-build', '-C', file('src/main').absolutePath
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
*/
}