-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
93 lines (81 loc) · 2.75 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
}
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
repositories {
maven {
url 'https://github.com/Goddchen/mvn-repo/raw/master/'
}
maven {
url 'http://maven.arcao.com/'
}
mavenCentral()
}
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ", TimeZone.getTimeZone("UTC"))
def gitVersionCode = 'git rev-list --count HEAD'.execute([], project.rootDir).text.trim().toInteger();
def isTravis = "true".equals(System.getenv("TRAVIS"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries preDexEnabled && !isTravis
}
defaultConfig {
versionCode gitVersionCode
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
release {
keyAlias "jidelnicekzcu"
}
}
buildTypes {
debug {
applicationIdSuffix '.dev'
versionNameSuffix '-dev'
}
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android.txt')
proguardFile 'proguard.cfg'
}
}
packagingOptions {
// removed because of conflict in creating package
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
//noinspection GradleDependency
compile 'com.android.support:appcompat-v7:20.0.0' // version 21.0.0 use Material ActionBar
compile 'com.android:volley:1.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.4'
compile 'com.android.support:support-v4-preferencefragment:1.0.0-1@aar'
}
if (project.hasProperty('storeFile') &&
project.hasProperty('storePassword') &&
project.hasProperty('keyPassword')) {
android.signingConfigs.release.storeFile = file(storeFile)
android.signingConfigs.release.storePassword = storePassword
android.signingConfigs.release.keyPassword = keyPassword
} else {
android.buildTypes.release.signingConfig = android.signingConfigs.debug
}