-
Notifications
You must be signed in to change notification settings - Fork 41
/
build.gradle
71 lines (64 loc) · 1.86 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
68
69
70
71
buildscript {
repositories {
jcenter()
maven {
url 'https://dl.google.com/dl/android/maven2'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://dl.google.com/dl/android/maven2/"
}
}
}
def getBibleVersion = { ->
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.buildToolsVersion = '28.0.3'
project.ext.minSdkVersion = 16
project.ext.compileSdkVersion = 28
project.ext.targetSdkVersion = 28
project.ext.versionCode = 124
project.ext.simpleVersionName = getBibleVersion()
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() + ")"
}
}
def isIde = { ->
def ide = false
def taskRequests = project.gradle.startParameter.taskRequests
if (taskRequests?.empty) {
ide = true
} else {
taskRequests[0].args.any {
if (it.endsWith('generateDebugSources') || it.endsWith('Debug')) {
ide = true
return true
}
}
return ide
}
}
// view-source:https://jcenter.bintray.com/com/tencent/mm/opensdk/wechat-sdk-android-without-mta/maven-metadata.xml
project.ext.wechatVersion = '5.1.6'
project.ext.hiddenApi = files()
project.ext.isIde = isIde()