forked from google/iosched
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
162 lines (151 loc) · 5.57 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
/*
* 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.
*/
// Top-level build file where you can add configuration options common to all
// sub-projects/modules.
buildscript {
ext {
// App version
versionName = '7.0.15' // X.Y.Z; X = Major, Y = minor, Z = Patch level
versionCodeBase = 70150 // XYYZZM; M = Module (tv, mobile)
versionCodeTv = versionCodeBase + 2
versionCodeMobile = versionCodeBase + 3
// SDK and tools
compileSdkVersion = 29
minSdkVersion = 21
minTvSdkVersion = 21 // TV was introduced with Lollipop, min SDK should be 21.
targetSdkVersion = 29
// App dependencies
androidGradlePluginVersion = '3.4.1'
appcompatVersion = '1.1.0-beta01'
activityVersion = '1.0.0-beta01'
cardviewVersion = '1.0.0'
archTestingVersion = '2.0.0'
arcoreVersion = '1.7.0'
browserVersion = '1.0.0'
constraintLayoutVersion = '1.1.3'
coreVersion = '1.2.0-alpha02'
crashlyticsVersion = '2.9.8'
dagger = "2.24"
dataBindingCompilerVersion = '3.0.1'
drawerLayoutVersion = '1.1.0-alpha02'
espressoVersion = '3.1.1'
fabricVersion = '1.25.4'
firebaseAuthVersion = '18.1.0'
firebaseConfigVersion = '18.0.0'
firebaseCoreVersion = '17.0.1'
firebaseFirestoreVersion = '20.2.0'
firebaseFunctionsVersion = '18.1.0'
firebaseMessagingVersion = '19.0.1'
firebaseUiVersion = "4.0.0"
flexboxVersion = "1.1.0"
fragmentVersion = "1.1.0-beta01"
glideVersion = "4.6.1"
googleMapUtilsVersion = "0.5"
googlePlayServicesMapsVersion = '16.0.0'
googlePlayServicesVisionVersion = '17.0.2'
googleServicesVersion = "3.2.0"
gsonVersion = "2.8.1"
hamcrestVersion = '1.3'
junitVersion = '4.12'
kotlinVersion = '1.3.41'
ktxVersion = "1.0.0"
leanbackVersion = '1.0.0'
legacySupportVersion = '1.0.0'
lifecycleVersion = '2.1.0-beta01'
lottieVersion = "3.0.0"
materialVersion = '1.1.0-alpha07'
mockitoVersion = "2.8.9"
mockitoKotlinVersion = "1.5.0"
navigationVersion = "2.0.0"
okhttpVersion = "3.10.0"
okioVersion = '1.14.0'
pageIndicatorVersion = "1.3.0"
roomVersion = '2.1.0'
rulesVersion = '1.1.1'
runnerVersion = '1.1.1'
testExtVersion = '1.1.0'
threetenabpVersion = "1.0.5"
threetenbpVersion = "1.3.6"
timberVersion = "4.7.1"
tvproviderVersion = '1.0.0'
}
repositories {
google()
mavenCentral()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
// Android Build Server
maven { url '../iosched-prebuilts/m2repository' }
}
dependencies {
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.google.gms:google-services:$googleServicesVersion"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
classpath "io.fabric.tools:gradle:$fabricVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "com.diffplug.gradle.spotless" version "3.17.0"
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
// For Android Build Server
// - Material Design Components
maven { url "${rootProject.projectDir}/../iosched-prebuilts/repository" }
// - Other dependencies
maven { url "${rootProject.projectDir}/../iosched-prebuilts/m2repository" }
// - Support Libraries, etc
maven {
url "${rootProject.projectDir}/../../../prebuilts/fullsdk/linux/extras/support/m2repository"
}
flatDir {
dirs "libs"
dirs project(":ar").file("libs")
}
}
}
subprojects {
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
kotlin {
target "**/*.kt"
ktlint("0.29.0").userData([
'max_line_length': '100',
])
licenseHeaderFile project.rootProject.file('copyright.kt')
}
}
// `spotlessCheck` runs when a build includes `check`, notably during presubmit. In these cases
// we prefer `spotlessCheck` run as early as possible since it fails in seconds. This prevents a
// build from running for several minutes doing other intensive tasks (resource processing, code
// generation, compilation, etc) only to fail on a formatting nit.
// Using `mustRunAfter` avoids creating a task dependency. The order is enforced only if
// `spotlessCheck` is already scheduled to run, so we can still build and launch from the IDE
// while the code is "dirty".
tasks.whenTaskAdded {
if (name == 'preBuild') {
mustRunAfter 'spotlessCheck'
}
}
}