This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
executable file
·114 lines (92 loc) · 4.65 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// Kotlin Language and Gradle version
// https://blog.jetbrains.com/kotlin/category/releases/
// https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md
ext.kotlin_version = '1.3.72'
// Dependency Injection for Android Applications
// https://dagger.dev/hilt/gradle-setup
// https://mvnrepository.com/artifact/com.google.dagger/hilt-android
ext.hilt_version = '2.30.1-alpha'
repositories {
google() // Google's Maven repository
jcenter() // Add the Bintray repository
// Gradle Plugin for Ktlint
// https://github.com/jlleitschuh/ktlint-gradle#ktlint-plugin
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
classpath "com.android.tools.build:gradle:4.1.1"
// https://kotlinlang.org/docs/reference/using-gradle.html
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// https://dagger.dev/hilt/
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
// The Google Services Gradle Plugin
// https://developers.google.com/android/guides/google-services-plugin
classpath 'com.google.gms:google-services:4.3.4'
// Firebase Crashlytics Gradle plugin
// https://firebase.google.com/docs/crashlytics/get-started?platform=android
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
// https://github.com/jlleitschuh/ktlint-gradle#supported-kotlin-plugins
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.2.1"
}
}
allprojects {
repositories {
google() // Google's Maven repository
jcenter() // Add the Bintray repository
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Define versions in a single place
ext {
// SDK Level and Tools
// https://source.android.com/setup/start/build-numbers
// -----------------------------------------------------
androidMinSdkVersion = 22 // Lollipop 5.1
androidTargetSdkVersion = 30 // Android 11
androidCompileSdkVersion = 30
buildToolsVersion = '29.0.3' // Android SDK Build Tools - Versions: https://developer.android.com/studio/releases/build-tools.html
// Google Products & Support library dependencies
// AndroidX Versions: https://developer.android.com/jetpack/androidx/versions
// --------------------------------------------------
appCompatVersion = '1.2.0' // https://developer.android.com/jetpack/androidx/releases/appcompat
constraintLayoutVersion = '2.0.4' // https://developer.android.com/reference/android/support/constraint/ConstraintLayout
archComponentVersion = '2.1.0' // https://developer.android.com/topic/libraries/architecture/adding-components
lifecycleVersion = '2.2.0' // https://developer.android.com/jetpack/androidx/releases/lifecycle
coreKtxVersion = '1.3.2' // https://developer.android.com/jetpack/androidx/releases/core
androidMaterialVersion = '1.3.0-beta01' // https://github.com/material-components/material-components-android/releases
viewPager2Version = '1.0.0' // https://developer.android.com/jetpack/androidx/releases/viewpager2
androidXHilt = '1.0.0-alpha02' // https://developer.android.com/jetpack/androidx/releases/hilt
// 3rd party library dependencies
// --------------------------------------------------
timberLibraryVersion = '4.7.1' // https://github.com/JakeWharton/timber
leakcanaryLibraryVersion = '2.4' // https://github.com/square/leakcanary/releases
rxJavaVersion = '3.0.8' // https://github.com/ReactiveX/RxJava/releases
rxAndroidVersion = '3.0.0' // https://github.com/ReactiveX/RxAndroid/releases
retrofitVersion = '2.9.0' // https://square.github.io/retrofit/
gsonVersion = '2.8.6' // https://github.com/google/gson
okHttpVersion = '4.9.0' // https://github.com/square/okhttp
// Unit test dependencies
// https://developer.android.com/training/testing/unit-testing/local-unit-tests
// --------------------------------------------------
junitVersion = '4.13.1'
mockitoVersion = '3.3.3'
androidxTestCore = '1.3.0'
androidxArchCoreTesting = archComponentVersion
androidTestRunnerVersion = '1.3.0'
espressoVersion = '3.3.0'
}
//
// Utility methods used in the build
//
static def gitSha() {
return 'git rev-parse --short HEAD'.execute().text.trim()
}