generated from mobiledevpro/Android-Kotlin-MVVM-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
164 lines (139 loc) · 6.3 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.rootVersions = [
"kotlin" : "1.6.10",
"gradle" : "4.2.2",
"playServices": "4.3.10",
"koin" : '3.1.5',
"navigation" : '2.3.5'
]
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$rootVersions.gradle"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$rootVersions.kotlin"
classpath "com.google.gms:google-services:$rootVersions.playServices"
classpath "io.insert-koin:koin-gradle-plugin:$rootVersions.koin"
}
}
// Gradle Doctor
// https://runningcode.github.io/gradle-doctor/
plugins {
id("com.osacky.doctor") version "0.7.3"
}
// Gradle Doctor all settings here https://runningcode.github.io/gradle-doctor/configuration/
doctor {
disallowMultipleDaemons = false
negativeAvoidanceThreshold = 500
warnWhenJetifierEnabled = true
javaHome {
ensureJavaHomeIsSet = true
ensureJavaHomeMatches = true
failOnError.set(true)
}
}
allprojects {
repositories {
google()
maven { url 'https://jitpack.io' }
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
appVersionName = "1.0.0"
appVersionCode = 1
compileSdkVersion = 31
minSdkVersion = 21
targetSdkVersion = 31
versions = [
"appcompat" : '1.4.1',
"preference" : '1.2.0',
"material" : '1.5.0',
"fragment" : '1.4.1',
"activity" : '1.3.1',
"constraintLayout": '2.1.3',
"recyclerview" : '1.2.1',
"coreKtx" : '1.7.0',
"commonUi" : "1.1.1",
"lifecycle" : '2.4.0',
"firebase" : [
"bom": "29.0.0"
],
"rx" : [
"android": "2.1.1",
"kotlin" : "2.4.0"
],
"room" : "2.4.1",
"leakcanary" : '2.8.1',
"playCore" : '1.10.3',
"playCoreKtx" : '1.8.1',
"workmanager" : '2.7.1'
]
deps = [
"appcompat" : "androidx.appcompat:appcompat:$versions.appcompat",
"preference" : "androidx.preference:preference:$versions.preference",
"material" : "com.google.android.material:material:$versions.material",
"constraintLayout" : "androidx.constraintlayout:constraintlayout:$versions.constraintLayout",
"coreKtx" : "androidx.core:core-ktx:$versions.coreKtx",
"activity" : "androidx.activity:activity-ktx:$versions.activity",
"fragment" : "androidx.fragment:fragment-ktx:$versions.fragment",
"recyclerView" : "androidx.recyclerview:recyclerview:$versions.recyclerview",
//Navigation
"navigationFragment": "androidx.navigation:navigation-fragment-ktx:$rootVersions.navigation",
"navigationUi" : "androidx.navigation:navigation-ui-ktx:$rootVersions.navigation",
//Dynamic Feature support
"navigationDynamic" : "androidx.navigation:navigation-dynamic-features-fragment:$rootVersions.navigation",
"playCore" : "com.google.android.play:core:$versions.playCore",
"playCoreKtx" : "com.google.android.play:core-ktx:$versions.playCoreKtx",
//common
"commonUI" : "com.github.mobiledevpro:android-kotlin-mvvm-template:$versions.commonUi",
//LifeCycle
"viewModel" : "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycle",
"liveData" : "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycle",
"saveState" : "androidx.lifecycle:lifecycle-viewmodel-savedstate:$versions.lifecycle",
"lifecycleService" : "androidx.lifecycle:lifecycle-service:$versions.lifecycle",
"lifecycleCompiler" : "androidx.lifecycle:lifecycle-compiler:$versions.lifecycle",
//DI, Koin
"koinCore" : "io.insert-koin:koin-core:$rootVersions.koin",
//Koin main features for Android (Scope,ViewModel ...)
"koinAndroid" : "io.insert-koin:koin-android:$rootVersions.koin",
//Koin Java Compatibility
"koinCompat" : "io.insert-koin:koin-android-compat:$rootVersions.koin",
//Koin Workmanager
"koinWorkmanager" : "io.insert-koin:koin-androidx-workmanager:$rootVersions.koin",
//Rx
"rxAndroid" : "io.reactivex.rxjava2:rxandroid:$versions.rx.android",
"rxKotlin" : "io.reactivex.rxjava2:rxkotlin:$versions.rx.kotlin",
//Room
"room" : "androidx.room:room-runtime:$versions.room",
"roomKtx" : "androidx.room:room-ktx:$versions.room",
"roomCompiler" : "androidx.room:room-compiler:$versions.room",
"roomRx" : "androidx.room:room-rxjava2:$versions.room",
//testing
"leakcanaryDebug" : "com.squareup.leakcanary:leakcanary-android:$versions.leakcanary",
//Background
"workmanager" : "androidx.work:work-runtime:$versions.workmanager",
"workmanagerKt" : "androidx.work:work-runtime-ktx:$versions.workmanager",
"workmanagerRx" : "androidx.work:work-rxjava2:$versions.workmanager"
]
core = [
"navigation" : project(":core:navigation"),
"utils" : project(":core:utils"),
"rx" : project("core:rx"),
"database" : project("core:database"),
"resources" : project("core:resources"),
"workmanager": project("core:workmanager"),
"recycler" : project("core:recycler")
]
feature = [
"price_alerter" : project(":feature:worker_price_alerter"),
"stock_list" : project(':feature:watch_list'),
"alert_log" : project(":feature:alert_log"),
"alert_log_core": project(":feature:alert_log_core")
]
}