Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose Multiplatform 1.5.0 gradle detected problems #530

Closed
Nailik opened this issue Jul 19, 2023 · 7 comments · Fixed by #575
Closed

Compose Multiplatform 1.5.0 gradle detected problems #530

Nailik opened this issue Jul 19, 2023 · 7 comments · Fixed by #575
Assignees
Labels
bug Something isn't working kotlin-update
Milestone

Comments

@Nailik
Copy link

Nailik commented Jul 19, 2023

Fix:

tasks.withType<SyncComposeResourcesForIosTask> {
    dependsOn(tasks.findByName("generateMRcommonMain"))
    dependsOn(tasks.findByName("generateMRiosSimulatorArm64Main"))
    dependsOn(tasks.findByName("generateMRiosArm64Main"))
}

Versions:
Kotlin: 1.9.0-RC
moko..resources=0.23.0
gradle gradle-8.2.1-all

Issue log:


Showing All Messages
> Task :resources:syncPodComposeResourcesForIos FAILED



FAILURE: Build failed with an exception.



* What went wrong:

Some problems were found with the configuration of task ':resources:syncPodComposeResourcesForIos' (type 'SyncComposeResourcesForIosTask').

  - Gradle detected a problem with the following location: '/Users/KIEller/rhasspy_mobile/resources/build/generated/moko/commonMain/res'.

    

    Reason: Task ':resources:syncPodComposeResourcesForIos' uses this output of task ':resources: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 ':resources:generateMRcommonMain' as an input of ':resources:syncPodComposeResourcesForIos'.

      2. Declare an explicit dependency on ':resources:generateMRcommonMain' from ':resources:syncPodComposeResourcesForIos' using Task#dependsOn.

      3. Declare an explicit dependency on ':resources:generateMRcommonMain' from ':resources:syncPodComposeResourcesForIos' using Task#mustRunAfter.

    

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

  - Gradle detected a problem with the following location: '/Users/KIEller/rhasspy_mobile/resources/build/generated/moko/iosSimulatorArm64Main/res'.

    

    Reason: Task ':resources:syncPodComposeResourcesForIos' uses this output of task ':resources:generateMRiosSimulatorArm64Main' 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 ':resources:generateMRiosSimulatorArm64Main' as an input of ':resources:syncPodComposeResourcesForIos'.

      2. Declare an explicit dependency on ':resources:generateMRiosSimulatorArm64Main' from ':resources:syncPodComposeResourcesForIos' using Task#dependsOn.

      3. Declare an explicit dependency on ':resources:generateMRiosSimulatorArm64Main' from ':resources:syncPodComposeResourcesForIos' using Task#mustRunAfter.

    

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

  - Gradle detected a problem with the following location: '/Users/KIEller/rhasspy_mobile/resources/build/generated/moko/iosSimulatorArm64Main/src'.

    

    Reason: Task ':resources:syncPodComposeResourcesForIos' uses this output of task ':resources:generateMRiosSimulatorArm64Main' 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 ':resources:generateMRiosSimulatorArm64Main' as an input of ':resources:syncPodComposeResourcesForIos'.

      2. Declare an explicit dependency on ':resources:generateMRiosSimulatorArm64Main' from ':resources:syncPodComposeResourcesForIos' using Task#dependsOn.

      3. Declare an explicit dependency on ':resources:generateMRiosSimulatorArm64Main' from ':resources:syncPodComposeResourcesForIos' using Task#mustRunAfter.

    

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

@Nailik Nailik changed the title Gradle 8.2.1 issue Gradle 8.2.0-alpha13 issue Jul 19, 2023
@Nailik Nailik changed the title Gradle 8.2.0-alpha13 issue Gradle 8.2.1 issue Jul 19, 2023
luca992 added a commit to Kamel-Media/Kamel that referenced this issue Jul 22, 2023
@hichamboushaba
Copy link

hichamboushaba commented Jul 23, 2023

I'm not sure the cause is related to Gradle version, but instead it's linked to the version of Compose Multiplatform, I believe the cause is this change to the Compose Multiplatform plugin: JetBrains/compose-multiplatform#3340

For anyone who doesn't use Compose Resources component in addition to Moko, you can workaround the issue by adding the property: org.jetbrains.compose.ios.resources.sync=false to your gradle properties.

@Alex009 Alex009 added this to the 0.23.1 milestone Jul 24, 2023
@Alex009 Alex009 added bug Something isn't working kotlin-update labels Jul 24, 2023
@Alex009 Alex009 changed the title Gradle 8.2.1 issue Compose Multiplatform 1.5.0 gradle detected problems Jul 30, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Jul 31, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Jul 31, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Jul 31, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Jul 31, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Jul 31, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Jul 31, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 3, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 3, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 3, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 3, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 3, 2023
@marenovakovic
Copy link

I'm not sure the cause is related to Gradle version, but instead it's linked to the version of Compose Multiplatform, I believe the cause is this change to the Compose Multiplatform plugin: JetBrains/compose-multiplatform#3340

For anyone who doesn't use Compose Resources component in addition to Moko, you can workaround the issue by adding the property: org.jetbrains.compose.ios.resources.sync=false to your gradle properties.

What about us who use both compose.resources and moko?

@AlexeyTsvetkov
Copy link

FYI: we (Compose Multiplatform team) discussed the issue internally. So far our conclusion is that making different resource libraries working together would probably be complicated and fragile. As a workaround, the next release of Compose Multiplatform Gradle plugin will turn off resource management automatically when moko-resources or libres Gradle plugins are used.

@Alex009
Copy link
Member

Alex009 commented Aug 7, 2023

FYI: we (Compose Multiplatform team) discussed the issue internally. So far our conclusion is that making different resource libraries working together would probably be complicated and fragile. As a workaround, the next release of Compose Multiplatform Gradle plugin will turn off resource management automatically when moko-resources or libres Gradle plugins are used.

Thx for notification.
Also we decide to move our resources directory from resources/MR to moko-resources. With this change we separate our original resources from other plugins that read resources source sets. In resources source sets will be added only generated version of processed resources, it maybe simplify integration with official solution and other plugins

ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 8, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 8, 2023
…cerockdev#530-fix-task-dependencies-for-Gradle-8.2.1

# Conflicts:
#	gradle/libs.versions.toml
#	resources-compose/src/appleMain/kotlin/dev/icerock/moko/resources/compose/internal/CGImageRef+Skia.kt
#	resources-compose/src/appleMain/kotlin/dev/icerock/moko/resources/compose/internal/NSDataExt.kt
#	resources-generator/build.gradle.kts
#	samples/compose-jvm-app/build.gradle.kts
#	samples/compose-resources-gallery/gradle.properties
#	samples/compose-resources-gallery/shared/build.gradle.kts
#	samples/ios-static-xcframework/build.gradle.kts
#	samples/kotlin-ios-app/build.gradle.kts
#	samples/resources-gallery/build.gradle.kts
@marenovakovic
Copy link

Thank you for the update.
For now I dropped moko-resources and I'm using string literals :/.
I will go back to moko-resources when this is fixed.

ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 10, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 10, 2023
ExNDY added a commit to ExNDY/moko-resources that referenced this issue Aug 10, 2023
Alex009 added a commit that referenced this issue Sep 9, 2023
@Alex009 Alex009 linked a pull request Sep 11, 2023 that will close this issue
71 tasks
@ExNDY
Copy link
Contributor

ExNDY commented Apr 17, 2024

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

@Alex009
Copy link
Member

Alex009 commented Apr 19, 2024

should be fixed in 0.24.0-beta-1

@Alex009 Alex009 closed this as completed Apr 19, 2024
@Alex009 Alex009 mentioned this issue Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kotlin-update
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants