-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.common.gradle
70 lines (61 loc) · 1.78 KB
/
build.common.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
68
69
70
import java.util.regex.Pattern
android {
buildToolsVersion '27.0.3'
compileSdkVersion 23
signingConfigs {
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile rootProject.file('libs/ftc.debug.keystore')
storePassword 'android'
}
}
defaultConfig {
minSdkVersion 19
targetSdkVersion 19
def manifestFile = project(':FtcRobotController').file('src/main/AndroidManifest.xml');
def manifestText = manifestFile.getText()
//
def vCodePattern = Pattern.compile("versionCode=\"(\\d+(\\.\\d+)*)\"")
def matcher = vCodePattern.matcher(manifestText)
matcher.find()
def vCode = Integer.parseInt(matcher.group(1))
//
def vNamePattern = Pattern.compile("versionName=\"(.*)\"")
matcher = vNamePattern.matcher(manifestText);
matcher.find()
def vName = matcher.group(1)
//
versionCode vCode
versionName vName
}
// Advanced user code might just want to use Vuforia directly, so we set up the libs as needed
buildTypes {
release {
// Disable debugging for release versions so it can be uploaded to Google Play.
//debuggable true
ndk {
abiFilters "armeabi-v7a"
}
}
debug {
debuggable true
ndk {
abiFilters "armeabi-v7a"
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir rootProject.file('libs')
}
}
repositories {
flatDir {
dirs rootProject.file('libs')
}
}