forked from JakeWharton/u2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (68 loc) · 2.24 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.jakewharton.hugo:hugo-plugin:1.0.+'
}
}
// Manifest version information!
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
apply plugin: 'android'
apply plugin: 'hugo'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:19.0.+'
compile 'com.squareup.dagger:dagger:1.2.1'
provided 'com.squareup.dagger:dagger-compiler:1.2.1'
compile 'com.squareup.okhttp:okhttp:1.3.0'
compile 'com.squareup.picasso:picasso:2.2.0'
compile 'com.squareup.retrofit:retrofit:1.4.1'
debugCompile 'com.squareup.retrofit:retrofit-mock:1.4.1'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'com.jakewharton.timber:timber:2.2.2'
debugCompile 'com.jakewharton.madge:madge:1.1.1'
debugCompile 'com.jakewharton.scalpel:scalpel:1.1.1'
compile 'com.netflix.rxjava:rxjava-core:0.16.1'
compile 'com.netflix.rxjava:rxjava-android:0.16.1'
compile 'com.etsy.android.grid:library:1.0.3'
}
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 19
buildToolsVersion "19.0.1"
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !isTravis
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
}
buildTypes {
debug {
packageNameSuffix '.dev'
versionNameSuffix '-dev'
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}