File tree Expand file tree Collapse file tree
buildSrc/src/main/kotlin/com/addzero/kmp
composeApp/src/commonMain/kotlin/com/addzero/kmp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import com.google.devtools.ksp.gradle.KspAATask
2+ import org.gradle.kotlin.dsl.withType
23import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
4+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
35import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
46
57plugins {
@@ -28,14 +30,21 @@ kotlin {
2830}
2931
3032// 修复 KSP 任务依赖问题
31- listOf (
32- KotlinCompile ::class ,
33- Kotlin2JsCompile ::class ,
34- KspAATask ::class
35- ).forEach { taskClass ->
36- tasks.withType(taskClass).configureEach {
37- if (name != " kspCommonMainKotlinMetadata" ) {
38- dependsOn(" kspCommonMainKotlinMetadata" )
39- }
33+ // listOf(
34+ // KotlinCompile::class,
35+ // Kotlin2JsCompile::class,
36+ // KspAATask::class
37+ // ).forEach { taskClass ->
38+ // tasks.withType(taskClass).configureEach {
39+ // if (name != "kspCommonMainKotlinMetadata") {
40+ // dependsOn("kspCommonMainKotlinMetadata")
41+ // }
42+ // }
43+ // }
44+
45+ tasks.withType<KotlinCompilationTask <* >>().configureEach {
46+ if (name != " kspKotlin" || name != " kspCommonMainKotlinMetadata" ) {
47+ dependsOn(" :backend:model:kspKotlin" )
48+ dependsOn(" :shared:kspCommonMainKotlinMetadata" )
4049 }
4150}
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ fun App() {
3333
3434 FollowSystemTheme (colorScheme = colorScheme) {
3535// GradientThemeWrapper(themeType = currentTheme) {
36- // MainLayoutWithLogin()
37- MainLayout ()
36+ MainLayoutWithLogin ()
37+ // MainLayout()
3838 ToastListener ()
3939// }
4040 }
You can’t perform that action at this time.
0 commit comments