This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
134 lines (115 loc) · 4.35 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
import java.text.SimpleDateFormat
//
// ConstraintLayout Demo App
// =========================
// A demo application for Android ConstraintLayout with various usage with sample code.
// https://github.com/amardeshbd/android-constraint-layout-cheatsheet
//
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
/*
* Kotlin Lang - Release notes
*
* https://github.com/JetBrains/kotlin/releases
* https://blog.jetbrains.com/kotlin/category/releases/
*/
ext.kotlinVersion = '1.3.21'
/*
* Android Plugin for Gradle - Version number and release notes
*
* - Stable: https://developer.android.com/studio/releases/gradle-plugin.html
* - Alpha: http://tools.android.com/tech-docs/new-build-system
*/
ext.androidGradleToolsVersion = '3.4.1'
/*
* Fabric/Firebase gradle tools version.
* https://firebase.google.com/docs/crashlytics/
*/
ext.fabricGradleToolsVersion = '1.29.0'
/*
* Google play services plugin
* https://firebase.google.com/docs/android/setup
*/
ext.googlePlayServicesToolsVersion = '4.2.0'
/*
* Firebase app dist
* https://firebase.google.com/docs/app-distribution/android/distribute-gradle
*/
ext.firebaseAppDistributionVersion = '1.0.0'
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath "com.android.tools.build:gradle:$androidGradleToolsVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "io.fabric.tools:gradle:$fabricGradleToolsVersion"
classpath "com.google.gms:google-services:$googlePlayServicesToolsVersion"
classpath "com.google.firebase:firebase-appdistribution-gradle:$firebaseAppDistributionVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Define versions in a single place
ext {
// Sdk and tools
// --------------------------------------------------
androidMinSdkVersion = 21 // Lollipop 5.0
androidTargetSdkVersion = 28 // Oreo MR1
androidCompileSdkVersion = 28
// Android SDK Build Tools - Versions: https://developer.android.com/studio/releases/build-tools.html
buildToolsVersion = '27.0.3'
// Java Version Compatibility
javaSourceCompatibilityVersion = JavaVersion.VERSION_1_8
javaTargetCompatibilityVersion = JavaVersion.VERSION_1_8
// Google Products & Support library dependencies
// --------------------------------------------------
// https://developer.android.com/topic/libraries/support-library/revisions.html
supportLibraryVersion = '1.0.0'
supportAppCompatVersion = '1.0.2'
// https://developer.android.com/reference/android/support/constraint/ConstraintLayout
constraintLayoutVersion = '1.1.3'
// https://developer.android.com/topic/libraries/architecture/adding-components
// https://developer.android.com/jetpack/androidx/releases/lifecycle
archComponentVersion = '2.0.0'
// https://firebase.google.com/docs/android/setup
firebaseVersion = '16.0.9'
// https://firebase.google.com/docs/firestore/quickstart
firestoreVersion = '19.0.2'
// https://firebase.google.com/docs/crashlytics/get-started
crashlyticsVersion = '2.9.2'
// Unit test dependencies
// --------------------------------------------------
junitVersion = '4.12'
mockitoVersion = '1.10.19'
hamcrestVersion = '1.3'
espressoVersion = '3.1.0-alpha4'
// 3rd party library dependencies
// --------------------------------------------------
daggerVersion = '2.15' // https://github.com/google/dagger
timberLibraryVersion = '4.7.1' // https://github.com/JakeWharton/timber
leakcanaryLibraryVersion = '2.0-alpha-2' // https://github.com/square/leakcanary/releases
}
//
// Utility methods used in the build
//
static def gitSha() {
return 'git rev-parse --short HEAD'.execute().text.trim()
}
static def buildTime() {
def df = new SimpleDateFormat("EEE, d MMM, yyyy hh:mm aaa z")
df.setTimeZone(TimeZone.getTimeZone("UTC"))
return df.format(new Date())
}