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,29 @@ 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.lifecycle.compose.ExperimentalLifecycleComposeApi" ,
60
+ " -opt-in=androidx.compose.foundation.ExperimentalFoundationApi" ,
61
+ " -opt-in=androidx.compose.animation.ExperimentalAnimationApi" ,
62
+ " -opt-in=androidx.compose.material.ExperimentalMaterialApi"
49
63
]
50
64
}
51
65
testOptions {
66
+ managedDevices {
67
+ devices {
68
+ pixel4api31(ManagedVirtualDevice ) {
69
+ device = " Pixel 4"
70
+ apiLevel = 31
71
+ systemImageSource = " google"
72
+ require64Bit = true
73
+ }
74
+ }
75
+ }
52
76
unitTests {
53
77
includeAndroidResources = true
54
78
all { ignoreFailures = true }
@@ -92,18 +116,25 @@ android {
92
116
}
93
117
}
94
118
}
95
- lintOptions {
96
- lintConfig project. file(' lint.xml' )
97
- disable " GoogleAppIndexingWarning"
98
- disable " RemoveWorkManagerInitializer"
119
+ packagingOptions {
120
+ resources {
121
+ excludes + = [' **/LICENSE' , ' **/LICENSE.txt' , ' **/NOTICE' , ' **/NOTICE.txt' , ' **/*.gwt.xml' ]
122
+ }
123
+ }
124
+ composeOptions {
125
+ kotlinCompilerExtensionVersion Versions . androidXComposeCompiler
126
+ }
127
+ lint {
128
+ disable ' GoogleAppIndexingWarning' , ' RemoveWorkManagerInitializer'
99
129
enable ' Interoperability'
130
+ lintConfig file(' lint.xml' )
100
131
}
101
- packagingOptions {
102
- exclude ' **/LICENSE '
103
- exclude ' **/LICENSE.txt '
104
- exclude ' **/NOTICE '
105
- exclude ' **/NOTICE.txt '
106
- exclude ' **/*.gwt.xml '
132
+ applicationVariants . all { variant ->
133
+ kotlin . sourceSets {
134
+ getByName(variant . name) {
135
+ kotlin . srcDir( " build/generated/ksp/ ${ variant.name } /kotlin " )
136
+ }
137
+ }
107
138
}
108
139
}
109
140
@@ -133,30 +164,50 @@ dependencies {
133
164
implementation Libs . androidx_browser
134
165
implementation Libs . androidx_constraint_layout
135
166
implementation Libs . androidx_core
167
+ implementation " androidx.core:core-splashscreen:1.0.0"
136
168
implementation Libs . androidx_fragment
137
169
implementation Libs . androidx_hilt_work
138
170
implementation Libs . androidx_lifecycle_viewmodel
171
+ implementation Libs . androidx_lifecycle_livedata
139
172
implementation Libs . androidx_lifecycle_java8
173
+ implementation Libs . androidx_lifecycle_runtime
140
174
implementation Libs . androidx_lifecycle_process
141
175
implementation Libs . androidx_navigation_fragment
142
176
implementation Libs . androidx_navigation_ui
177
+ implementation " androidx.navigation:navigation-compose:$Versions . androidXNavigation "
143
178
implementation Libs . androidx_preference
144
179
implementation Libs . androidx_recyclerview
145
180
implementation Libs . androidx_recyclerview_selection
146
181
implementation Libs . androidx_room_runtime
147
182
implementation Libs . androidx_room_ktx
148
183
implementation Libs . androidx_work_runtime
149
184
implementation Libs . androidx_work_gcm
185
+ implementation ' androidx.activity:activity-compose:1.6.0'
186
+ implementation " androidx.compose.ui:ui:$Versions . androidXCompose "
187
+ implementation " androidx.compose.foundation:foundation:$Versions . androidXCompose "
188
+ implementation " androidx.compose.material:material:$Versions . androidXCompose "
189
+ implementation " androidx.compose.material:material-icons-core:$Versions . androidXCompose "
190
+ implementation " androidx.compose.material:material-icons-extended:$Versions . androidXCompose "
191
+ implementation " androidx.compose.ui:ui-tooling:$Versions . androidXCompose "
192
+
193
+ implementation " androidx.lifecycle:lifecycle-runtime-compose:2.6.0-alpha02"
194
+ implementation " androidx.lifecycle:lifecycle-viewmodel-compose:$Versions . androidXLifecycle "
195
+ implementation ' androidx.hilt:hilt-navigation-compose:1.0.0'
196
+ androidTestImplementation " androidx.compose.ui:ui-test-junit4:$Versions . androidXCompose "
150
197
kapt Libs . androidx_room_compiler
151
198
kapt Libs . androidx_hilt_compiler
152
199
153
200
// Android Material
154
201
implementation Libs . material_components
155
202
156
203
// Color Picker
157
- implementation " com.github.dhaval2404:colorpicker:2.0"
204
+ implementation " com.github.dhaval2404:colorpicker:2.3"
205
+
206
+ // Compose Destinations
207
+ implementation ' io.github.raamcosta.compose-destinations:core:1.7.21-beta'
208
+ ksp ' io.github.raamcosta.compose-destinations:ksp:1.7.21-beta'
158
209
159
- // Dagger
210
+ // Dagger
160
211
implementation Libs . daggerHiltAndroid
161
212
kapt Libs . daggerHiltAndroidCompiler
162
213
@@ -182,8 +233,8 @@ dependencies {
182
233
implementation Libs . kotlinCoroutinesAndroid
183
234
184
235
// LeakCanary
185
- debugImplementation Libs . leakCanary
186
- implementation Libs . leakCanaryPlumberAndroid
236
+ // debugImplementation Libs.leakCanary
237
+ // implementation Libs.leakCanaryPlumberAndroid
187
238
188
239
// Logging
189
240
implementation Libs . slf4jAndroidLogger
@@ -200,6 +251,10 @@ kapt {
200
251
correctErrorTypes true
201
252
}
202
253
254
+ jacoco {
255
+ toolVersion = " 0.8.7"
256
+ }
257
+
203
258
play {
204
259
def serviceAccountFileName = " google-play-api.json"
205
260
if (rootProject. file(serviceAccountFileName). exists()) {
0 commit comments