forked from BracketCove/SpaceNotes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathversions.gradle
101 lines (82 loc) · 3.82 KB
/
versions.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
/**
*Source largely taken from this OS repo: https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample/versions.gradle
* Thank you to everyone involved in this awesome OS project!
*
* In this file, we basically build a tree of deps in a very DRY way.
**/
//ext is a way to add extra data key/value pairs to a gradle domain object. Since it has no prefix,
//it is short hand for project.ext in this case.
//[:] is groovy syntax for creating a "Map" Object, which is a collection of key/value pairs
//create a map of key/value pairs, called deps (deps)
ext.deps = [:]
//def means we're making a local variable. We'll use this map to build our deps key/value
//pairs below
def versions = [:]
versions.lifecycle = "2.0.0-rc01"
versions.junit = "5.1.1"
versions.room = "2.1.0-alpha01"
versions.navigation = "1.0.0-alpha06"
versions.espresso = "3.0.1"
versions.mockito = "2.13.0"
versions.dagger = "2.15"
versions.support_test = "1.0.1"
versions.design = "1.0.0-rc01"
versions.appcompat = "1.0.0"
versions.ktx_fragment = "1.0.0"
versions.rec_view = "1.0.0"
versions.firebase_auth = "16.1.0"
versions.firebase_core = "16.0.6"
versions.firebase_firestore = "17.1.4"
versions.play_services_auth = "16.0.1"
versions.constraint_layout = "2.0.0-alpha2"
versions.coroutine_version = "1.0.1"
versions.android_gradle_plugin = "3.2.1"
versions.kotlin = "1.3.0-rc-190"
def deps = [:]
def play_services = [:]
play_services.auth = "com.google.android.gms:play-services-auth:$versions.play_services_auth"
deps.play_services = play_services
def android = [:]
android.appcompat = "androidx.appcompat:appcompat:$versions.appcompat"
android.fragment = "androidx.fragment:fragment:$versions.appcompat"
android.recyclerview = "androidx.recyclerview:recyclerview:$versions.appcompat"
android.design = "com.google.android.material:material:$versions.design"
android.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
android.lifecycle_extensions = "androidx.lifecycle:lifecycle-extensions:$versions.lifecycle"
android.ktx_fragment = "androidx.fragment:fragment-ktx:$versions.ktx_fragment"
deps.android = android
def room = [:]
room.runtime = "androidx.room:room-runtime:$versions.room"
room.compiler = "androidx.room:room-compiler:$versions.room"
deps.room = room
def firebase = [:]
firebase.core = "com.google.firebase:firebase-core:$versions.firebase_core"
firebase.auth = "com.google.firebase:firebase-auth:$versions.firebase_auth"
firebase.firestore = "com.google.firebase:firebase-firestore:$versions.firebase_firestore"
deps.firebase = firebase
def test = [:]
test.junit = "org.junit.jupiter:junit-jupiter-api:$versions.junit"
test.jupiter_engine = "org.junit.jupiter:junit-jupiter-engine:$versions.junit"
test.vintage_engine = "org.junit.vintage:junit-vintage-engine:$versions.junit"
test.kotlin_junit = "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin"
test.mockk = "io.mockk:mockk:1.9"
deps.test = test
def kotlin = [:]
kotlin.kotlin_jre = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin"
kotlin.kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
kotlin.coroutines_core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutine_version"
kotlin.coroutines_android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutine_version"
deps.kotlin = kotlin
def build_versions = [:]
build_versions.min_sdk = 21
build_versions.target_sdk = 28
ext.build_versions = build_versions
deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
ext.deps = deps
def addRepos(RepositoryHandler handler) {
handler.google()
handler.jcenter()
handler.maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
handler.maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
ext.addRepos = this.&addRepos