When I run my build I get this message:
* What went wrong:
A problem was found with the configuration of task ':kspExtensiveTestKotlin' (type 'KspTaskJvm').
- Gradle detected a problem with the following location: '/Users/ftomassetti/repos/kolasu-java-langmodule/build/generated-src/antlr/extensiveTest'.
Reason: Task ':kspExtensiveTestKotlin' uses this output of task ':generateExtensiveTestGrammarSource' 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 ':generateExtensiveTestGrammarSource' as an input of ':kspExtensiveTestKotlin'.
2. Declare an explicit dependency on ':generateExtensiveTestGrammarSource' from ':kspExtensiveTestKotlin' using Task#dependsOn.
3. Declare an explicit dependency on ':generateExtensiveTestGrammarSource' from ':kspExtensiveTestKotlin' 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.
So I add the dependency:
tasks.named("kspExtensiveTestKotlin") {
mustRunAfter("generateExtensiveTestGrammarSource")
}
and I get:
Task with name 'kspExtensiveTestKotlin' not found in root project 'kolasu-java-langmodule'.
So I imagine somehow the task is created dynamically while running the build and cause this issue. I have not idea how to get rid of this. Any suggestion?