forked from google/iosched
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
175 lines (147 loc) · 7.19 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.fabric'
android {
compileSdkVersion rootProject.compileSdkVersion
defaultConfig {
applicationId "com.google.samples.apps.iosched"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode rootProject.versionCodeMobile
versionName rootProject.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "float[]",
"MAP_FLOORPLAN_MAPPING",
"{${map_floorplan_nw}, ${map_floorplan_ne}, ${map_floorplan_se}}"
buildConfigField "com.google.android.gms.maps.model.LatLng",
"MAP_VIEWPORT_BOUND_NW",
"new com.google.android.gms.maps.model.LatLng(${map_viewport_bound_nw})"
buildConfigField "com.google.android.gms.maps.model.LatLng",
"MAP_VIEWPORT_BOUND_SE",
"new com.google.android.gms.maps.model.LatLng(${map_viewport_bound_se})"
buildConfigField "float", "MAP_CAMERA_FOCUS_ZOOM", "${map_camera_focus_zoom}"
resValue "dimen", "map_camera_bearing", "${map_default_camera_bearing}"
resValue "dimen", "map_camera_target_lat", "${map_default_camera_target_lat}"
resValue "dimen", "map_camera_target_lng", "${map_default_camera_target_lng}"
resValue "dimen", "map_camera_tilt", "${map_default_camera_tilt}"
resValue "dimen", "map_camera_zoom", "${map_default_camera_zoom}"
resValue "dimen", "map_viewport_min_zoom", "${map_viewport_min_zoom}"
manifestPlaceholders = [crashlyticsEnabled: true]
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
manifestPlaceholders = [crashlyticsEnabled: true]
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string",
"google_maps_key",
"AIzaSyD5jqwKMm1SeoYsW25vxCXfTlhDBeZ4H5c"
}
debug {
manifestPlaceholders = [crashlyticsEnabled: false]
resValue "string",
"google_maps_key",
"AIzaSyAhJx57ikQH9rYc8IT8W3d2As5cGHMBvuo"
}
staging {
initWith debug
// Specifies a sorted list of fallback build types that the
// plugin should try to use when a dependency does not include a
// "staging" build type.
// Used with :test-shared, which doesn't have a staging variant.
matchingFallbacks = ['debug']
}
}
dataBinding {
enabled true
}
signingConfigs {
// We need to sign debug builds with a debug key to make firebase auth happy
debug {
storeFile file("../debug.keystore")
keyAlias "androiddebugkey"
keyPassword "android"
storePassword "android"
}
}
// debug and release variants share the same source dir
sourceSets {
debug.java.srcDir 'src/debugRelease/java'
release.java.srcDir 'src/debugRelease/java'
}
lintOptions {
disable "InvalidPackage", "MissingTranslation"
}
testBuildType "staging"
}
dependencies {
implementation project(":shared")
testImplementation project(':test-shared')
testImplementation project(':androidTest-shared')
implementation fileTree(dir: 'libs', include: ['*.jar'])
// UI
implementation "androidx.appcompat:appcompat:$rootProject.appcompatVersion"
implementation "androidx.browser:browser:$rootProject.browserVersion"
implementation "androidx.constraintlayout:constraintlayout:$rootProject.constraintLayoutVersion"
implementation "com.google.android.material:material:$rootProject.materialVersion"
implementation "com.google.android:flexbox:$rootProject.flexboxVersion"
implementation "com.airbnb.android:lottie:$rootProject.lottieVersion"
implementation "com.pacioianu.david:ink-page-indicator:$rootProject.pageIndicatorVersion"
// Architecture Components
implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
kapt "androidx.lifecycle:lifecycle-compiler:$rootProject.lifecycleVersion"
testImplementation "androidx.arch.core:core-testing:$rootProject.lifecycleVersion"
// Dagger
implementation "com.google.dagger:dagger-android:$rootProject.dagger"
implementation "com.google.dagger:dagger-android-support:$rootProject.dagger"
kapt "com.google.dagger:dagger-compiler:$rootProject.dagger"
kapt "com.google.dagger:dagger-android-processor:$rootProject.dagger"
// Glide
implementation "com.github.bumptech.glide:glide:$rootProject.glideVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.glideVersion"
// Fabric and Firebase
implementation "com.firebaseui:firebase-ui-auth:$rootProject.firebaseUiVersion"
implementation "com.crashlytics.sdk.android:crashlytics:$crashlyticsVersion"
// Utils
// Date and time API for Java.
api "com.jakewharton.threetenabp:threetenabp:$rootProject.threetenabpVersion"
testImplementation "org.threeten:threetenbp:$rootProject.threetenbpVersion"
implementation "androidx.core:core-ktx:$rootProject.ktxVersion"
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
// Instrumentation tests
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$rootProject.espressoVersion"
androidTestImplementation "androidx.test:runner:$rootProject.runnerVersion"
androidTestImplementation "androidx.test:rules:$rootProject.rulesVersion"
// Local unit tests
testImplementation "junit:junit:$rootProject.junitVersion"
testImplementation "org.mockito:mockito-core:$rootProject.mockitoVersion"
testImplementation "com.nhaarman:mockito-kotlin:$rootProject.mockitoKotlinVersion"
testImplementation "org.hamcrest:hamcrest-library:$rootProject.hamcrestVersion"
// Leak Canary
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
stagingImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
// Solve conflicts with gson. DataBinding is using an old version.
implementation "com.google.code.gson:gson:$gsonVersion"
}
apply plugin: 'com.google.gms.google-services'