Alex Styl
05/05/2024, 10:18 AMFAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':jsDevelopmentExecutableCompileSync' (type 'DefaultIncrementalSyncTask').
- Gradle detected a problem with the following location: '/Users/alexstyl/projects/KotlinJs/build/js/packages/KotlinJs/kotlin'.
Reason: Task ':jsNodeProductionRun' uses this output of task ':jsDevelopmentExecutableCompileSync' 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 ':jsDevelopmentExecutableCompileSync' as an input of ':jsNodeProductionRun'.
2. Declare an explicit dependency on ':jsDevelopmentExecutableCompileSync' from ':jsNodeProductionRun' using Task#dependsOn.
3. Declare an explicit dependency on ':jsDevelopmentExecutableCompileSync' from ':jsNodeProductionRun' using Task#mustRunAfter.
For more information, please refer to <https://docs.gradle.org/8.4/userguide/validation_problems.html#implicit_dependency> in the Gradle documentation.
It gets resolved if I add to `build.gradle.kts`:
tasks.named("jsDevelopmentExecutableCompileSync") {
dependsOn("jsNodeProductionRun")
mustRunAfter("jsNodeProductionRun")
}
Seems like a bug
EDIT: Ended up removing the code above and run it with ./gradlew jsNodeRun
instead. works without an issue nowturansky
05/05/2024, 5:03 PMAlex Styl
05/06/2024, 9:32 AMturansky
05/06/2024, 9:33 AMAlex Styl
05/06/2024, 7:59 PMkotlin {
jvm()
js {
nodejs()
binaries.executable()
}
turansky
05/07/2024, 7:50 AMdependencies
block?Alex Styl
05/07/2024, 7:53 AMturansky
05/07/2024, 7:55 AMturansky
05/07/2024, 7:56 AM