@@ -13,6 +13,7 @@ class AppConfig {
13
13
val targetSdk = libs.versions.targetSdk.get().toInt()
14
14
15
15
val jvmTarget = JvmTarget .JVM_17
16
+ val jvmToolChain = 17
16
17
val javaVersion = JavaVersion .VERSION_17
17
18
val testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
18
19
}
@@ -52,6 +53,7 @@ android {
52
53
// @see: https://developer.android.com/develop/ui/compose/tooling#bom
53
54
// @see: https://developer.android.com/develop/ui/compose/bom
54
55
compose = true
56
+ buildConfig = true
55
57
}
56
58
57
59
buildTypes {
@@ -65,11 +67,16 @@ android {
65
67
}
66
68
67
69
kotlin {
70
+ jvmToolchain(appConfig.jvmToolChain)
68
71
compilerOptions {
69
72
jvmTarget.set(appConfig.jvmTarget)
70
73
}
71
74
}
72
75
76
+ composeCompiler {
77
+ enableStrongSkippingMode = true
78
+ }
79
+
73
80
dependencies {
74
81
// Application dependencies
75
82
implementation(libs.kotlin.stdlib)
@@ -79,10 +86,32 @@ dependencies {
79
86
implementation(libs.android.appcompat)
80
87
implementation(libs.converter.gson)
81
88
82
- // jetpack compose dependencies
83
- // https://developer.android.google.cn/develop/ui/compose/setup?hl=en#kotlin_1
89
+ // Jetpack compose dependencies
90
+ // @see: https://developer.android.google.cn/develop/ui/compose/setup?hl=en#kotlin_1
91
+ // Specify the Compose BOM with a version definition
92
+ val composeBom = platform(" androidx.compose:compose-bom:2024.06.00" )
93
+ implementation(composeBom)
94
+
95
+
96
+ // Specify Compose library dependencies without a version definition
97
+ implementation(" androidx.compose.foundation:foundation" )
98
+ implementation(" androidx.compose.material3:material3" )
99
+ implementation(" androidx.compose.material:material-icons-core" )
100
+ // Integration with activities
101
+ implementation(" androidx.activity:activity-compose:1.9.0" )
102
+ // Integration with ViewModels
103
+ implementation(" androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1" )
104
+ // Integration with LiveData
105
+ implementation(" androidx.compose.runtime:runtime-livedata" )
106
+ // ..
107
+ // ..
108
+
109
+ // Android Studio Preview support
110
+ implementation(" androidx.compose.ui:ui-tooling-preview" )
111
+ debugImplementation(" androidx.compose.ui:ui-tooling" )
84
112
85
113
// Unit/Integration tests dependencies
114
+ testImplementation(composeBom)
86
115
testImplementation(libs.kotest.runner.junit5)
87
116
testImplementation(libs.kotest.assertions.core)
88
117
testImplementation(libs.kotest.property)
@@ -91,6 +120,9 @@ dependencies {
91
120
testImplementation(libs.robolectric)
92
121
93
122
// UI tests dependencies
123
+ androidTestImplementation(composeBom)
124
+ androidTestImplementation(" androidx.compose.ui:ui-test-junit4" )
125
+ debugImplementation(" androidx.compose.ui:ui-test-manifest" )
94
126
androidTestImplementation(libs.androidx.runner)
95
127
androidTestImplementation(libs.androidx.espresso.core)
96
128
androidTestImplementation(libs.androidx.junit)
0 commit comments