-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy pathbuild.gradle
74 lines (61 loc) · 1.99 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
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 7
targetSdkVersion 23
versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)
}
signingConfigs {
release
}
buildTypes {
if (isReleaseBuild()) {
release {
signingConfig signingConfigs.release
}
}
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}
}
// It would be better to fix the issues
lintOptions {
abortOnError false
}
}
dependencies {
// ChangeLog Library
compile project(':ChangeLogLibrary')
// Support Libraries
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
//To test layout
compile 'org.lucasr.dspec:dspec:0.1.1'
}
def Properties props = new Properties()
def propFile = file('../signing.properties')
if (propFile.canRead()){
props.load(new FileInputStream(propFile))
if (props!=null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
println 'RELEASE BUILD SIGNING'
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
} else {
println 'RELEASE BUILD NOT FOUND SIGNING PROPERTIES'
android.buildTypes.release.signingConfig = null
}
}else {
println 'RELEASE BUILD NOT FOUND SIGNING FILE'
android.buildTypes.release.signingConfig = null
}