Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Missing Gradle task wiring with 2.2.20-2.0.3 #2595

@vRallev

Description

@vRallev

When upgrading from 2.2.20-2.0.2 to version 2.2.20-2.0.3, our KMP project runs into errors related to missing task dependencies:

* What went wrong:
Some problems were found with the configuration of task ':recipes:common:impl:kspDebugKotlinAndroid' (type 'KspAATask').
  - Gradle detected a problem with the following location: '/Users/ralf/Development/app-platform/recipes/common/impl/build/generated/compose/resourceGenerator/kotlin/androidDebugResourceAccessors'.

    Reason: Task ':recipes:common:impl:kspDebugKotlinAndroid' uses this output of task ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' 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 ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'.
      2. Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn.
      3. Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/9.0.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
  - Gradle detected a problem with the following location: '/Users/ralf/Development/app-platform/recipes/common/impl/build/generated/compose/resourceGenerator/kotlin/androidMainResourceAccessors'.

    Reason: Task ':recipes:common:impl:kspDebugKotlinAndroid' uses this output of task ':recipes:common:impl:generateResourceAccessorsForAndroidMain' 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 ':recipes:common:impl:generateResourceAccessorsForAndroidMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'.
      2. Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn.
      3. Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/9.0.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
  - Gradle detected a problem with the following location: '/Users/ralf/Development/app-platform/recipes/common/impl/build/generated/compose/resourceGenerator/kotlin/androidMainResourceCollectors'.

    Reason: Task ':recipes:common:impl:kspDebugKotlinAndroid' uses this output of task ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' 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 ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'.
      2. Declare an explicit dependency on ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn.
      3. Declare an explicit dependency on ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/9.0.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
  - Gradle detected a problem with the following location: '/Users/ralf/Development/app-platform/recipes/common/impl/build/generated/compose/resourceGenerator/kotlin/noWasmJsMainResourceAccessors'.

    Reason: Task ':recipes:common:impl:kspDebugKotlinAndroid' uses this output of task ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' 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 ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'.
      2. Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn.
      3. Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/9.0.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
  - Gradle detected a problem with the following location: '/Users/ralf/Development/app-platform/recipes/common/impl/build/generated/compose/resourceGenerator/kotlin/commonResClass'.

    Reason: Task ':recipes:common:impl:kspDebugKotlinAndroid' uses this output of task ':recipes:common:impl:generateComposeResClass' 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 ':recipes:common:impl:generateComposeResClass' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'.
      2. Declare an explicit dependency on ':recipes:common:impl:generateComposeResClass' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn.
      3. Declare an explicit dependency on ':recipes:common:impl:generateComposeResClass' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/9.0.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Declare task ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidDebug' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter
> Declare task ':recipes:common:impl:generateResourceAccessorsForAndroidMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter
> Declare task ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateActualResourceCollectorsForAndroidMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter
> Declare task ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForNoWasmJsMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter
> Declare task ':recipes:common:impl:generateComposeResClass' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateComposeResClass' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateComposeResClass' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter
> Declare task ':recipes:common:impl:generateResourceAccessorsForCommonMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForCommonMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateResourceAccessorsForCommonMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter
> Declare task ':recipes:common:impl:generateExpectResourceCollectorsForCommonMain' as an input of ':recipes:common:impl:kspDebugKotlinAndroid'
> Declare an explicit dependency on ':recipes:common:impl:generateExpectResourceCollectorsForCommonMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#dependsOn
> Declare an explicit dependency on ':recipes:common:impl:generateExpectResourceCollectorsForCommonMain' from ':recipes:common:impl:kspDebugKotlinAndroid' using Task#mustRunAfter

https://scans.gradle.com/s/zj4qi7p524wd2

An open source project that reproduces this issue is here: https://github.com/vRallev/app-platform/tree/rwo/ksp-bug You can reproduce this bug by running ./gradlew :recipes:common:impl:assembleDebug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions