Hi There, I am trying to generate a library using ...
# moko
s
Hi There, I am trying to generate a library using MavenLocal facing this issue
* What went wrong:
A problem was found with the configuration of task ':kmm-pw-ui-module:iosX64SourcesJar' (type 'Jar').
- Gradle detected a problem with the following location: '/Users/sureshmaidaragi/StudioProjects/kmm-pw-pitara/kmm-pw-ui-module/build/generated/moko/commonMain/src'.
Reason: Task ':kmm-pw-ui-module:iosX64SourcesJar' uses this output of task ':kmm-pw-ui-module: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 ':kmm-pw-ui-module:generateMRcommonMain' as an input of ':kmm-pw-ui-module:iosX64SourcesJar'.
2. Declare an explicit dependency on ':kmm-pw-ui-module:generateMRcommonMain' from ':kmm-pw-ui-module:iosX64SourcesJar' using Task#dependsOn.
3. Declare an explicit dependency on ':kmm-pw-ui-module:generateMRcommonMain' from ':kmm-pw-ui-module:iosX64SourcesJar' using Task#mustRunAfter.
Can someone help me to know what I have missed
a
what version of moko-resources used?
s
0.23.0 Btw I am able to solve it by adding build.gradle.kts?,
Copy code
tasks.findByName("sourcesJar")!!.dependsOn("generateMRcommonMain")
tasks.findByName("iosArm64SourcesJar")!!.dependsOn("generateMRiosArm64Main")
tasks.findByName("iosSimulatorArm64SourcesJar")!!.dependsOn("generateMRiosSimulatorArm64Main")
tasks.findByName("iosX64SourcesJar")!!.dependsOn("generateMRiosX64Main")

afterEvaluate {
    tasks.named("androidReleaseSourcesJar") {
        dependsOn("generateMRandroidMain")
    }
}
a
you can add dependency directly, yes
or you can try 0.24.0 alpha
s
0.24.0 required's migration process, so used above solution