forked from nikclayton/android-squeezer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (109 loc) · 4.15 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
buildscript {
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
apply plugin: 'com.neenbedankt.android-apt'
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// Android support libraries
// Note: these libraries require the "Google Repository" and "Android
// Support Repository" to be installed via the SDK manager.
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.android.support:support-annotations:22.2.0'
// Third party libraries
compile 'com.google.guava:guava:18.0'
// findbugs is required for Proguard to work with Guava.
compile 'com.google.code.findbugs:jsr305:2.0.2'
// EventBus, https://github.com/greenrobot/EventBus.
compile project(':libs:eventbus:EventBus')
// Changelogs, see https://github.com/cketti/ckChangeLog.
compile 'de.cketti.library.changelog:ckchangelog:1.2.0'
// LoganSquare JSON
apt 'com.bluelinelabs:logansquare-compiler:1.0.6'
compile 'com.bluelinelabs:logansquare:1.0.6'
// Crashlytics.
compile 'com.crashlytics.android:crashlytics:1.+'
// KitKat time picker
compile 'com.nineoldandroids:library:2.4.0'
compile project(':libs:datetimepicker')
// JVM tests
testCompile 'junit:junit:4.12'
}
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
def gitHash = "git rev-parse --short HEAD".execute().text.trim()
def hasModifiedDeletedOrOtherFiles = !"git ls-files -mdo --exclude-standard".execute().text.trim().isEmpty()
def hasStagedFiles = !"git diff-index --no-ext-diff --name-only --cached HEAD".execute().text.trim().isEmpty()
def dirtyWorkingCopy = hasModifiedDeletedOrOtherFiles || hasStagedFiles
def gitDescription = dirtyWorkingCopy ? "${gitHash}-dirty" : gitHash
defaultConfig {
minSdkVersion 7
targetSdkVersion 21
buildConfigField "String", "GIT_DESCRIPTION", "\"${gitDescription}\""
}
lintOptions {
// Downgrade missing translations to non-fatal severity.
warning 'MissingTranslation'
}
buildTypes {
release {
minifyEnabled true
// You could use 'proguardFile "proguard.cfg"' here and get the
// same effect, but this ensures that any changes to
// proguard-android-optimize.txt are automatically included.
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
proguardFile "proguard-crashlytics.cfg"
proguardFile "proguard-eventbus.cfg"
proguardFile "proguard-guava.cfg"
proguardFile "proguard-squeezer.cfg"
}
}
signingConfigs {
if(project.hasProperty("Squeezer.properties")
&& file(project.property("Squeezer.properties")).exists()) {
Properties props = new Properties()
props.load(new FileInputStream(file(project.property("Squeezer.properties"))))
release {
storeFile file("keystore")
storePassword props['key.store.password']
keyAlias "squeezer"
keyPassword props['key.alias.password']
}
} else {
release {
storeFile file("squeezer-local-release-key.keystore")
storePassword "squeezer"
keyAlias "squeezer"
keyPassword "squeezer"
}
}
}
productFlavors {
beta {
versionCode 53
versionName "1.4.0-beta-1"
signingConfig android.signingConfigs.release
}
live {
versionCode 54
versionName "1.4.0"
signingConfig android.signingConfigs.release
}
}
}