forked from GD-HBX/Brevent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (43 loc) · 1.34 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def getBreventVersion = { ->
def tag = 'git describe --tags --always'.execute().text.trim()
if (tag.startsWith('v')) {
tag = tag.substring(1)
}
if ('git diff --no-ext-diff --quiet HEAD'.execute().waitFor() == 0) {
return tag
} else {
return tag + '-dirty'
}
}
project.ext.abiFilters = ['armeabi', 'arm64-v8a', 'x86', 'x86_64']
project.ext.supportLibraryVersion = '25.3.1'
project.ext.buildToolsVersion = '25.0.3'
project.ext.minSdkVersion = 21
project.ext.targetSdkVersion = 25
project.ext.versionCode = 49
project.ext.simpleVersionName = getBreventVersion()
project.ext.versionName = project.ext.simpleVersionName
if (rootProject.file('ant.properties').exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(rootProject.file('ant.properties')))
if (properties['build.codename'] != null) {
project.ext.versionName = properties['build.codename'] + "(" + getBreventVersion() + ")"
}
}
project.ext.hiddenApi = files(project(':hidden-api').file('build/intermediates/bundles/default/classes.jar'))