I'm trying to update one of my KMP projects to Kot...
# android
a
I'm trying to update one of my KMP projects to Kotlin 2.0.0. Currently using Kotlin 2.0.0, AGP 8.2.0 (can't go any higher because I use IDEA), Gradle 8.2. But now I'm getting the following kind of errors. Are there any known solutions for this?
Copy code
Some problems were found with the configuration of task ':sample:shared:dynamic-features:feature2Impl:generateDebugLintModel' (type 'LintModelWriterTask').
  - Gradle detected a problem with the following location: '/Users/arkivanov/dev/workspace/Decompose/sample/shared/dynamic-features/feature2Impl/build/generated/compose/resourceGenerator/kotlin/androidUnitTestResourceAccessors'.
    
    Reason: Task ':sample:shared:dynamic-features:feature2Impl:generateDebugLintModel' uses this output of task ':sample:shared:dynamic-features:feature2Impl:generateResourceAccessorsForAndroidUnitTest' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':sample:shared:dynamic-features:feature2Impl:generateResourceAccessorsForAndroidUnitTest' as an input of ':sample:shared:dynamic-features:feature2Impl:generateDebugLintModel'.
      2. Declare an explicit dependency on ':sample:shared:dynamic-features:feature2Impl:generateResourceAccessorsForAndroidUnitTest' from ':sample:shared:dynamic-features:feature2Impl:generateDebugLintModel' using Task#dependsOn.
      3. Declare an explicit dependency on ':sample:shared:dynamic-features:feature2Impl:generateResourceAccessorsForAndroidUnitTest' from ':sample:shared:dynamic-features:feature2Impl:generateDebugLintModel' using Task#mustRunAfter.
Here is a workaround that I'm currently using, but it would be nice if it could just work.
Copy code
tasks.matching { it.name == "generateDebugLintModel" }.configureEach {
    dependsOn("generateResourceAccessorsForAndroidUnitTest")
    dependsOn("generateResourceAccessorsForAndroidUnitTestDebug")
}

tasks.matching { it.name == "lintAnalyzeDebug" }.configureEach {
    dependsOn("generateResourceAccessorsForAndroidUnitTest")
    dependsOn("generateResourceAccessorsForAndroidUnitTestDebug")
}