-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
146 lines (125 loc) · 4.87 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
buildscript {
ext.kotlin_version = '1.1.0'
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'kotlin-android'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.brunoaybar.unofficialupc"
minSdkVersion 15
targetSdkVersion 25
versionCode 6
versionName "1.1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
productFlavors {
demo {
buildConfigField 'String', 'REST_URL', '"https://wwww.demo.test"' //demo url
buildConfigField 'String', 'AMPLITUDE_SDK', '"6c4e9c09fbb393b193cab2d42cf31f4f"' //demo key
manifestPlaceholders = [fabric_io_id: "fc00164b9970d08b4fd172c31f9bc0f8f67b2744"] //demo key
resValue "string", "facebook_app_id", "1898631080421022" //demo key
}
prod {
def propsFile = rootProject.file('appconfig.properties')
if(propsFile.exists()){
def props = new Properties()
props.load(new FileInputStream(propsFile))
buildConfigField 'String', 'REST_URL', props["UPC_REST_URL"]
buildConfigField 'String', 'AMPLITUDE_SDK', props["AMPLITUDE_KEY"]
manifestPlaceholders = [fabric_io_id: props["FABRIC_ID"]]
resValue "string", "facebook_app_id", props["FACEBOOK_ID"]
}else{
//Wont compile, you need to create a appconfig.properties file at project root and set your values
}
}
}
sourceSets {
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
}
kapt {
generateStubs = true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//General dependencies
compile "com.google.guava:guava:20.0"
compile 'com.github.lzyzsd:circleprogress:1.1.0@aar'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.roughike:bottom-bar:2.0.2'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.android.support:multidex:1.0.1'
//Dependency injection
compile 'com.google.dagger:dagger:2.9'
//annotationProcessor 'com.google.dagger:dagger-compiler:2.9'
kapt 'com.google.dagger:dagger-compiler:2.9'
//Butterknife
compile 'com.jakewharton:butterknife:8.4.0'
//annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
kapt 'com.jakewharton:butterknife-compiler:8.4.0'
// RxJava
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.jakewharton.rxbinding:rxbinding:0.4.0'
//Retrofit
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
// Mockito
testCompile 'org.mockito:mockito-core:1.10.19'
//Analytics
compile 'com.amplitude:android-sdk:2.7.1'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-config:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
//Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:1.1.0"
//Tests w/ Kotlin
testCompile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.0'
testCompile 'org.jetbrains.kotlin:kotlin-test-junit:1.1.0'
testCompile "com.nhaarman:mockito-kotlin:1.1.0"
testCompile 'org.amshove.kluent:kluent:1.14'
testCompile "org.robolectric:robolectric:3.2.1"
}