Closed ghubstan closed 5 months ago
I'd suggest using an afterEvaluate
block, checking for the existence of the given tasks by name and connect them if they are found, similarly as it's done here https://github.com/jreleaser/jreleaser/blob/3ccb2e4fcb0ab9510f8171eae1e20893d7dd0f97/plugins/jreleaser-tool-provider/jreleaser-tool-provider.gradle#L129
I'd suggest using an
afterEvaluate
block...
That seems to have resolved the issue.
afterEvaluate {
var taskJandex = tasks.named("jandex")
var taskPluginUnderTestMetadata = tasks.named("pluginUnderTestMetadata")
if (taskJandex.isPresent && taskPluginUnderTestMetadata.isPresent) {
taskPluginUnderTestMetadata.get().dependsOn(taskJandex)
} else {
println("One or both jandex related tasks are not present. Task pluginUnderTestMetadata.dependsOn(jandex).")
println("Task jandex: $taskJandex")
println("Task pluginUnderTestMetadata: $taskPluginUnderTestMetadata")
}
}
Many thanks!
🎉 This issue has been resolved in v2.0.0 (Release Notes)
I have a mono-repo of Quarkus modules:
Child module Z
A depends on Y A depends on Z No dependencies between Y and Z
Module A (and A's QuarkusTests) can import/instantiate application scoped beans defined modules Y and Z, "if" the Y and Z build.gradle.kts files' plugins specs include:
But now I cannot compile (for dev/test) modules Y or Z (alone), unless I comment out
// id("org.kordamp.gradle.jandex") version "1.1.0"
from their build files.I get Gradle error:
My multi-module app&test (A) works fine if I use the jandex plugin in child modules Y and Z. But I cannot work on child modules Y and Z in isolation if Y and Z are using the jandex plugin.
I am using quarkusPlatformVersion=3.8.3, Gradle version 8.7 (build files written in Kotlin DSL), JDK 21
I have searched around for reports of similar problem, but have found none. I can work around this by commenting/uncommenting the plugin def as needed, but would like better solution. Can anyone advise?