forked from W3INFO/ForceStopGB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
84 lines (72 loc) · 2.44 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
72
73
74
75
76
77
78
79
80
81
82
83
84
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
versionCode Integer.parseInt('git rev-list HEAD --count'.execute().text.trim())
versionName 'git describe --tags'.execute().text.trim().substring(1)
buildConfigField "boolean", "RELEASE", (versionName.contains("alpha") || versionName.contains("beta")) ? "false" : "true"
buildConfigField "boolean", "WECHAT_DONATE", "false"
buildConfigField "boolean", "ALIPAY_DONATE", "false"
buildConfigField "String", "WECHAT_ACCOUNT", "null"
buildConfigField "String", "ALIPAY_ACCOUNT", "null"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
androidTest.setRoot('tests')
}
if (new File("ant.properties").exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(file("ant.properties")))
signingConfigs {
release {
storeFile file(properties['key.store'])
storePassword properties['key.store.password']
keyAlias properties['key.alias']
keyPassword properties['key.alias.password']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.release
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
provided fileTree(dir: 'lib', include: ['*.jar'])
compile fileTree(dir: 'libs', include: ['*.jar'])
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
options.compilerArgs << '-Xbootclasspath/p:' + fileTree(dir: 'lib', include: ['*.jar']).files.join(':')
}