moko-resources icon indicating copy to clipboard operation
moko-resources copied to clipboard

Reason: Task ':client:core:res:detektMetadataCommonMain' uses this output of task ':client:core:res:generateMRcommonMain' without declaring an explicit or implicit dependency.

Open mustafaozhan opened this issue 2 years ago • 2 comments

Hello 👋

The issue marked as resolved with 0.21.2 release still happens with 0.23.0.

The original issue is here: https://github.com/icerockdev/moko-resources/issues/421

error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':client:core:res:detektMetadataCommonMain' (type 'Detekt').
  - Gradle detected a problem with the following location: '/home/runner/work/CCC/CCC/client/core/res/build/generated/moko/commonMain/src'.
    
    Reason: Task ':client:core:res:detektMetadataCommonMain' uses this output of task ':client:core:res:generateMRcommonMain' 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 ':client:core:res:generateMRcommonMain' as an input of ':client:core:res:detektMetadataCommonMain'.
      2. Declare an explicit dependency on ':client:core:res:generateMRcommonMain' from ':client:core:res:detektMetadataCommonMain' using Task#dependsOn.
      3. Declare an explicit dependency on ':client:core:res:generateMRcommonMain' from ':client:core:res:detektMetadataCommonMain' using Task#mustRunAfter.

Related PR that removes the workaround: https://github.com/Oztechan/CCC/pull/2582

mustafaozhan avatar Aug 20 '23 10:08 mustafaozhan

A problem was found with the configuration of task ':sketchable-compose:generateMRandroidMain' (type 'GenerateMultiplatformResourcesTask').
  - Gradle detected a problem with the following location: 'D:\Programming\Multiplatform\Projects\Sketchable\sketchable-compose\build\generated\moko\androidMain'.
    
    Reason: Task ':sketchable-compose:androidReleaseSourcesJar' uses this output of task ':sketchable-compose:generateMRandroidMain' 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 ':sketchable-compose:generateMRandroidMain' as an input of ':sketchable-compose:androidReleaseSourcesJar'.
      2. Declare an explicit dependency on ':sketchable-compose:generateMRandroidMain' from ':sketchable-compose:androidReleaseSourcesJar' using Task#dependsOn.
      3. Declare an explicit dependency on ':sketchable-compose:generateMRandroidMain' from ':sketchable-compose:androidReleaseSourcesJar' using Task#mustRunAfter.
    
    Please refer to https://docs.gradle.org/8.0/userguide/validation_problems.html#implicit_dependency for more details about this problem.

wakaztahir avatar Sep 05 '23 12:09 wakaztahir

maybe this will be fixed with #575 - need to test

Alex009 avatar Jan 14 '24 16:01 Alex009

maybe will be fixed in 0.24.0, please check in 0.24.0-alpha-6

ExNDY avatar Apr 17 '24 05:04 ExNDY

should be fixed in 0.24.0-beta-1

Alex009 avatar Apr 19 '24 15:04 Alex009