forked from cgruber/u2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (102 loc) · 3.37 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
// Manifest version information!
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC"))
def isTravis = "true".equals(System.getenv("TRAVIS"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
android {
compileSdkVersion 22
buildToolsVersion '22.0.0'
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !isTravis
}
signingConfigs {
u2020 {
storeFile file('u2020.keystore')
storePassword 'android'
keyAlias 'android'
keyPassword 'android'
}
}
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
signingConfig signingConfigs.u2020
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
}
buildTypes {
debug {
applicationIdSuffix '.debug'
}
}
productFlavors {
internal {
applicationId 'com.jakewharton.u2020.internal'
}
production {
applicationId 'com.jakewharton.u2020'
}
}
lintOptions {
textReport true
textOutput 'stdout'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
// TODO remove eventually: http://b.android.com/162285
configurations {
internalDebugCompile
}
dependencies {
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:support-annotations:22.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:22.0.0'
compile 'com.squareup.dagger:dagger:1.2.2'
apt 'com.squareup.dagger:dagger-compiler:1.2.2'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
internalDebugCompile 'com.squareup.retrofit:retrofit-mock:1.9.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.jakewharton.timber:timber:2.7.1'
compile 'com.jakewharton.byteunits:byteunits:0.9.0'
internalDebugCompile 'com.jakewharton.madge:madge:1.1.1'
internalDebugCompile 'com.jakewharton.scalpel:scalpel:1.1.1'
compile 'io.reactivex:rxjava:1.0.8'
compile 'io.reactivex:rxandroid:0.24.0'
compile 'net.danlew:android.joda:2.7.1'
internalCompile 'com.mattprecious.telescope:telescope:1.4.0@aar'
}
def installAll = tasks.create('installAll')
installAll.description = 'Install all applications.'
android.applicationVariants.all { variant ->
installAll.dependsOn(variant.install)
// Ensure we end up in the same group as the other install tasks.
installAll.group = variant.install.group
}