1+ plugins {
2+ id ' com.google.devtools.ksp' version ' 1.7.10-1.0.6'
3+ }
4+
15apply plugin : ' com.android.application'
26apply plugin : ' kotlin-android'
37apply plugin : ' kotlin-kapt'
4- apply plugin : " androidx.navigation.safeargs.kotlin "
8+ apply plugin : " androidx.navigation.safeargs"
59apply plugin : ' com.google.firebase.crashlytics'
610apply plugin : ' com.google.gms.google-services'
711apply plugin : ' dagger.hilt.android.plugin'
8- apply plugin : ' com.mikepenz.aboutlibraries.plugin'
912apply plugin : ' com.google.firebase.firebase-perf'
1013apply plugin : ' com.github.triplet.play'
14+ apply plugin : ' com.dicedmelon.gradle.jacoco-android'
1115
1216android {
1317 compileSdkVersion Config . compile_sdk
14- buildToolsVersion Config . build_tools
1518
1619 defaultConfig {
1720 applicationId " de.psdev.devdrawer"
@@ -22,16 +25,20 @@ android {
2225
2326 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
2427 multiDexEnabled true
25-
26- resConfig " en"
28+ resConfigs ' en'
2729
2830 // Version info
2931 buildConfigField ' String' , ' GIT_SHA' , " \" ${ project.ext.gitHash} \" "
3032
33+ vectorDrawables {
34+ useSupportLibrary true
35+ }
36+
3137 javaCompileOptions. annotationProcessorOptions. arguments[' room.schemaLocation' ] = rootProject. file(' schemas' ). toString()
3238 }
3339 buildFeatures {
3440 viewBinding true
41+ compose true
3542 }
3643 compileOptions {
3744 sourceCompatibility = JavaVersion . VERSION_1_8
@@ -41,11 +48,15 @@ android {
4148 jvmTarget = " 1.8"
4249 freeCompilerArgs + = [
4350 " -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"
51+ " -Xjvm-default=all" ,
52+ " -opt-in=kotlin.RequiresOptIn" ,
53+ " -opt-in=kotlin.ExperimentalStdlibApi" ,
54+ " -opt-in=kotlin.time.ExperimentalTime" ,
55+ " -opt-in=kotlinx.coroutines.FlowPreview" ,
56+ " -opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" ,
57+ " -opt-in=androidx.compose.foundation.ExperimentalFoundationApi" ,
58+ " -opt-in=androidx.compose.animation.ExperimentalAnimationApi" ,
59+ " -opt-in=androidx.compose.material.ExperimentalMaterialApi"
4960 ]
5061 }
5162 testOptions {
@@ -92,18 +103,25 @@ android {
92103 }
93104 }
94105 }
95- lintOptions {
96- lintConfig project. file(' lint.xml' )
97- disable " GoogleAppIndexingWarning"
98- disable " RemoveWorkManagerInitializer"
106+ packagingOptions {
107+ resources {
108+ excludes + = [' **/LICENSE' , ' **/LICENSE.txt' , ' **/NOTICE' , ' **/NOTICE.txt' , ' **/*.gwt.xml' ]
109+ }
110+ }
111+ composeOptions {
112+ kotlinCompilerExtensionVersion Versions . androidXComposeCompiler
113+ }
114+ lint {
115+ disable ' GoogleAppIndexingWarning' , ' RemoveWorkManagerInitializer'
99116 enable ' Interoperability'
117+ lintConfig file(' lint.xml' )
100118 }
101- packagingOptions {
102- exclude ' **/LICENSE '
103- exclude ' **/LICENSE.txt '
104- exclude ' **/NOTICE '
105- exclude ' **/NOTICE.txt '
106- exclude ' **/*.gwt.xml '
119+ applicationVariants . all { variant ->
120+ kotlin . sourceSets {
121+ getByName(variant . name) {
122+ kotlin . srcDir( " build/generated/ksp/ ${ variant.name } /kotlin " )
123+ }
124+ }
107125 }
108126}
109127
@@ -133,30 +151,49 @@ dependencies {
133151 implementation Libs . androidx_browser
134152 implementation Libs . androidx_constraint_layout
135153 implementation Libs . androidx_core
154+ implementation " androidx.core:core-splashscreen:1.0.0"
136155 implementation Libs . androidx_fragment
137156 implementation Libs . androidx_hilt_work
138157 implementation Libs . androidx_lifecycle_viewmodel
158+ implementation Libs . androidx_lifecycle_livedata
139159 implementation Libs . androidx_lifecycle_java8
160+ implementation Libs . androidx_lifecycle_runtime
140161 implementation Libs . androidx_lifecycle_process
141162 implementation Libs . androidx_navigation_fragment
142163 implementation Libs . androidx_navigation_ui
164+ implementation " androidx.navigation:navigation-compose:$Versions . androidXNavigation "
143165 implementation Libs . androidx_preference
144166 implementation Libs . androidx_recyclerview
145167 implementation Libs . androidx_recyclerview_selection
146168 implementation Libs . androidx_room_runtime
147169 implementation Libs . androidx_room_ktx
148170 implementation Libs . androidx_work_runtime
149171 implementation Libs . androidx_work_gcm
172+ implementation ' androidx.activity:activity-compose:1.5.1'
173+ implementation " androidx.compose.ui:ui:$Versions . androidXCompose "
174+ implementation " androidx.compose.foundation:foundation:$Versions . androidXCompose "
175+ implementation " androidx.compose.material:material:$Versions . androidXCompose "
176+ implementation " androidx.compose.material:material-icons-core:$Versions . androidXCompose "
177+ implementation " androidx.compose.material:material-icons-extended:$Versions . androidXCompose "
178+ implementation " androidx.compose.ui:ui-tooling:$Versions . androidXCompose "
179+
180+ implementation " androidx.lifecycle:lifecycle-viewmodel-compose:$Versions . androidXLifecycle "
181+ implementation ' androidx.hilt:hilt-navigation-compose:1.0.0'
182+ androidTestImplementation " androidx.compose.ui:ui-test-junit4:$Versions . androidXCompose "
150183 kapt Libs . androidx_room_compiler
151184 kapt Libs . androidx_hilt_compiler
152185
153186 // Android Material
154187 implementation Libs . material_components
155188
156189 // Color Picker
157- implementation " com.github.dhaval2404:colorpicker:2.0 "
190+ implementation " com.github.dhaval2404:colorpicker:2.3 "
158191
159- // Dagger
192+ // Compose Destinations
193+ implementation ' io.github.raamcosta.compose-destinations:core:1.6.15-beta'
194+ ksp ' io.github.raamcosta.compose-destinations:ksp:1.6.15-beta'
195+
196+ // Dagger
160197 implementation Libs . daggerHiltAndroid
161198 kapt Libs . daggerHiltAndroidCompiler
162199
@@ -182,8 +219,8 @@ dependencies {
182219 implementation Libs . kotlinCoroutinesAndroid
183220
184221 // LeakCanary
185- debugImplementation Libs . leakCanary
186- implementation Libs . leakCanaryPlumberAndroid
222+ // debugImplementation Libs.leakCanary
223+ // implementation Libs.leakCanaryPlumberAndroid
187224
188225 // Logging
189226 implementation Libs . slf4jAndroidLogger
@@ -200,6 +237,10 @@ kapt {
200237 correctErrorTypes true
201238}
202239
240+ jacoco {
241+ toolVersion = " 0.8.7"
242+ }
243+
203244play {
204245 def serviceAccountFileName = " google-play-api.json"
205246 if (rootProject. file(serviceAccountFileName). exists()) {
0 commit comments