Ryan Scott
06/02/2025, 1:33 PMCould not create an instance of type org.jetbrains.kotlin.gradle.targets.js.ir.KotlinBrowserJsIr.
> Cannot invoke "org.gradle.api.tasks.TaskProvider.flatMap(org.gradle.api.Transformer)" because the return value of "org.jetbrains.kotlin.gradle.targets.js.ir.ExecutableWasm.getOptimizeTask()" is null
My wasmJs target configuration is as below:
wasmJs {
outputModuleName.set("foundation-util-log")
browser {
testTask {
useKarma {
useFirefoxHeadless()
}
}
}
binaries.library()
}
Ryan Scott
06/02/2025, 1:35 PMjs {
outputModuleName.set("foundation-util-log")
browser {
testTask {
useKarma {
useFirefoxHeadless()
}
}
}
binaries.library()
}
tapchicoma
06/02/2025, 3:41 PMRyan Scott
06/02/2025, 3:44 PMRyan Scott
06/02/2025, 3:45 PMRyan Scott
06/02/2025, 3:45 PMtapchicoma
06/02/2025, 3:46 PMtapchicoma
06/02/2025, 3:46 PMRyan Scott
06/02/2025, 3:49 PMtapchicoma
06/02/2025, 3:50 PMRyan Scott
06/04/2025, 6:42 AMRyan Scott
06/04/2025, 6:42 AMtapchicoma
06/04/2025, 8:07 AMRyan Scott
06/04/2025, 8:08 AMRyan Scott
06/04/2025, 8:08 AMRyan Scott
06/04/2025, 8:09 AMRyan Scott
06/04/2025, 8:15 AM> Task :foundation-testtools:publishJsPublicationToMavenLocal FAILED
[Incubating] Problems report is available at: file:///Users/ryan/repos/maven_machines/mobile/foundation/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':foundation-testtools:publishJsPublicationToMavenLocal' (type 'PublishToMavenLocal').
- Gradle detected a problem with the following location: '/Users/ryan/repos/maven_machines/mobile/foundation/foundation-testtools/build/libs/foundation-testtools-0.2.0-javadoc.jar.asc'.
Reason: Task ':foundation-testtools:publishJsPublicationToMavenLocal' uses this output of task ':foundation-testtools:signWasmJsPublication' 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 ':foundation-testtools:signWasmJsPublication' as an input of ':foundation-testtools:publishJsPublicationToMavenLocal'.
2. Declare an explicit dependency on ':foundation-testtools:signWasmJsPublication' from ':foundation-testtools:publishJsPublicationToMavenLocal' using Task#dependsOn.
3. Declare an explicit dependency on ':foundation-testtools:signWasmJsPublication' from ':foundation-testtools:publishJsPublicationToMavenLocal' using Task#mustRunAfter.
Ryan Scott
06/04/2025, 8:17 AMRyan Scott
06/04/2025, 8:18 AMtapchicoma
06/04/2025, 8:18 AMRyan Scott
06/04/2025, 8:19 AMRyan Scott
06/04/2025, 8:19 AMtapchicoma
06/04/2025, 8:19 AMtapchicoma
06/04/2025, 8:20 AMRyan Scott
06/04/2025, 8:20 AMtapchicoma
06/04/2025, 8:20 AMtapchicoma
06/04/2025, 8:24 AMWill mustRunAfter work better?
dependsOn
is a hard dependency. Meaning task which you declare dependsOn
dependency should always run.
mustRunAfter
is a soft dependency. Meaning task which you declare mustRunAfter
should run first if it is in task graph, but will not run if it is not in the task graph.Ryan Scott
06/04/2025, 8:25 AMpublishAllPublicationsToXRepository
), but thanks for that clarification. I'll give it a try anyways.