1
+ import com.android.build.api.dsl.ManagedVirtualDevice
2
+
3
+ plugins {
4
+ id ' com.google.devtools.ksp' version ' 1.7.10-1.0.6'
5
+ }
6
+
1
7
apply plugin : ' com.android.application'
2
8
apply plugin : ' kotlin-android'
3
9
apply plugin : ' kotlin-kapt'
4
- apply plugin : " androidx.navigation.safeargs.kotlin "
10
+ apply plugin : " androidx.navigation.safeargs"
5
11
apply plugin : ' com.google.firebase.crashlytics'
6
12
apply plugin : ' com.google.gms.google-services'
7
13
apply plugin : ' dagger.hilt.android.plugin'
8
- apply plugin : ' com.mikepenz.aboutlibraries.plugin'
9
14
apply plugin : ' com.google.firebase.firebase-perf'
10
15
apply plugin : ' com.github.triplet.play'
16
+ apply plugin : ' com.dicedmelon.gradle.jacoco-android'
11
17
12
18
android {
13
19
compileSdkVersion Config . compile_sdk
14
- buildToolsVersion Config . build_tools
15
20
16
21
defaultConfig {
17
22
applicationId " de.psdev.devdrawer"
@@ -22,16 +27,20 @@ android {
22
27
23
28
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
24
29
multiDexEnabled true
25
-
26
- resConfig " en"
30
+ resConfigs ' en'
27
31
28
32
// Version info
29
33
buildConfigField ' String' , ' GIT_SHA' , " \" ${ project.ext.gitHash} \" "
30
34
35
+ vectorDrawables {
36
+ useSupportLibrary true
37
+ }
38
+
31
39
javaCompileOptions. annotationProcessorOptions. arguments[' room.schemaLocation' ] = rootProject. file(' schemas' ). toString()
32
40
}
33
41
buildFeatures {
34
42
viewBinding true
43
+ compose true
35
44
}
36
45
compileOptions {
37
46
sourceCompatibility = JavaVersion . VERSION_1_8
@@ -41,14 +50,28 @@ android {
41
50
jvmTarget = " 1.8"
42
51
freeCompilerArgs + = [
43
52
" -Xinline-classes" ,
44
- " -Xopt-in=kotlin.RequiresOptIn" ,
45
- " -Xopt-in=kotlin.ExperimentalStdlibApi" ,
46
- " -Xopt-in=kotlin.time.ExperimentalTime" ,
47
- " -Xopt-in=kotlinx.coroutines.FlowPreview" ,
48
- " -Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
53
+ " -Xjvm-default=all" ,
54
+ " -opt-in=kotlin.RequiresOptIn" ,
55
+ " -opt-in=kotlin.ExperimentalStdlibApi" ,
56
+ " -opt-in=kotlin.time.ExperimentalTime" ,
57
+ " -opt-in=kotlinx.coroutines.FlowPreview" ,
58
+ " -opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" ,
59
+ " -opt-in=androidx.compose.foundation.ExperimentalFoundationApi" ,
60
+ " -opt-in=androidx.compose.animation.ExperimentalAnimationApi" ,
61
+ " -opt-in=androidx.compose.material.ExperimentalMaterialApi"
49
62
]
50
63
}
51
64
testOptions {
65
+ managedDevices {
66
+ devices {
67
+ pixel4api31(ManagedVirtualDevice ) {
68
+ device = " Pixel 4"
69
+ apiLevel = 31
70
+ systemImageSource = " google"
71
+ require64Bit = true
72
+ }
73
+ }
74
+ }
52
75
unitTests {
53
76
includeAndroidResources = true
54
77
all { ignoreFailures = true }
@@ -92,18 +115,25 @@ android {
92
115
}
93
116
}
94
117
}
95
- lintOptions {
96
- lintConfig project. file(' lint.xml' )
97
- disable " GoogleAppIndexingWarning"
98
- disable " RemoveWorkManagerInitializer"
118
+ packagingOptions {
119
+ resources {
120
+ excludes + = [' **/LICENSE' , ' **/LICENSE.txt' , ' **/NOTICE' , ' **/NOTICE.txt' , ' **/*.gwt.xml' ]
121
+ }
122
+ }
123
+ composeOptions {
124
+ kotlinCompilerExtensionVersion Versions . androidXComposeCompiler
125
+ }
126
+ lint {
127
+ disable ' GoogleAppIndexingWarning' , ' RemoveWorkManagerInitializer'
99
128
enable ' Interoperability'
129
+ lintConfig file(' lint.xml' )
100
130
}
101
- packagingOptions {
102
- exclude ' **/LICENSE '
103
- exclude ' **/LICENSE.txt '
104
- exclude ' **/NOTICE '
105
- exclude ' **/NOTICE.txt '
106
- exclude ' **/*.gwt.xml '
131
+ applicationVariants . all { variant ->
132
+ kotlin . sourceSets {
133
+ getByName(variant . name) {
134
+ kotlin . srcDir( " build/generated/ksp/ ${ variant.name } /kotlin " )
135
+ }
136
+ }
107
137
}
108
138
}
109
139
@@ -133,30 +163,49 @@ dependencies {
133
163
implementation Libs . androidx_browser
134
164
implementation Libs . androidx_constraint_layout
135
165
implementation Libs . androidx_core
166
+ implementation " androidx.core:core-splashscreen:1.0.0"
136
167
implementation Libs . androidx_fragment
137
168
implementation Libs . androidx_hilt_work
138
169
implementation Libs . androidx_lifecycle_viewmodel
170
+ implementation Libs . androidx_lifecycle_livedata
139
171
implementation Libs . androidx_lifecycle_java8
172
+ implementation Libs . androidx_lifecycle_runtime
140
173
implementation Libs . androidx_lifecycle_process
141
174
implementation Libs . androidx_navigation_fragment
142
175
implementation Libs . androidx_navigation_ui
176
+ implementation " androidx.navigation:navigation-compose:$Versions . androidXNavigation "
143
177
implementation Libs . androidx_preference
144
178
implementation Libs . androidx_recyclerview
145
179
implementation Libs . androidx_recyclerview_selection
146
180
implementation Libs . androidx_room_runtime
147
181
implementation Libs . androidx_room_ktx
148
182
implementation Libs . androidx_work_runtime
149
183
implementation Libs . androidx_work_gcm
184
+ implementation ' androidx.activity:activity-compose:1.5.1'
185
+ implementation " androidx.compose.ui:ui:$Versions . androidXCompose "
186
+ implementation " androidx.compose.foundation:foundation:$Versions . androidXCompose "
187
+ implementation " androidx.compose.material:material:$Versions . androidXCompose "
188
+ implementation " androidx.compose.material:material-icons-core:$Versions . androidXCompose "
189
+ implementation " androidx.compose.material:material-icons-extended:$Versions . androidXCompose "
190
+ implementation " androidx.compose.ui:ui-tooling:$Versions . androidXCompose "
191
+
192
+ implementation " androidx.lifecycle:lifecycle-viewmodel-compose:$Versions . androidXLifecycle "
193
+ implementation ' androidx.hilt:hilt-navigation-compose:1.0.0'
194
+ androidTestImplementation " androidx.compose.ui:ui-test-junit4:$Versions . androidXCompose "
150
195
kapt Libs . androidx_room_compiler
151
196
kapt Libs . androidx_hilt_compiler
152
197
153
198
// Android Material
154
199
implementation Libs . material_components
155
200
156
201
// Color Picker
157
- implementation " com.github.dhaval2404:colorpicker:2.0"
202
+ implementation " com.github.dhaval2404:colorpicker:2.3"
203
+
204
+ // Compose Destinations
205
+ implementation ' io.github.raamcosta.compose-destinations:core:1.7.21-beta'
206
+ ksp ' io.github.raamcosta.compose-destinations:ksp:1.7.21-beta'
158
207
159
- // Dagger
208
+ // Dagger
160
209
implementation Libs . daggerHiltAndroid
161
210
kapt Libs . daggerHiltAndroidCompiler
162
211
@@ -182,8 +231,8 @@ dependencies {
182
231
implementation Libs . kotlinCoroutinesAndroid
183
232
184
233
// LeakCanary
185
- debugImplementation Libs . leakCanary
186
- implementation Libs . leakCanaryPlumberAndroid
234
+ // debugImplementation Libs.leakCanary
235
+ // implementation Libs.leakCanaryPlumberAndroid
187
236
188
237
// Logging
189
238
implementation Libs . slf4jAndroidLogger
@@ -200,6 +249,10 @@ kapt {
200
249
correctErrorTypes true
201
250
}
202
251
252
+ jacoco {
253
+ toolVersion = " 0.8.7"
254
+ }
255
+
203
256
play {
204
257
def serviceAccountFileName = " google-play-api.json"
205
258
if (rootProject. file(serviceAccountFileName). exists()) {
0 commit comments