Open MarceloRuiz opened 1 year ago
Just in case, the code that solved the problem, written with the Kotlin dsl is bellow. The most important point for my case is that the new attributes are applied to configurations that are resolvable (and in my particular case, filtered to contain the string "quarkus"):
configurations.matching {
it.isCanBeResolved && it.name.toString().contains("quarkus")
}.configureEach {
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named<Usage>(Usage.JAVA_RUNTIME))
attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, objects.named<OperatingSystemFamily>("linux"))
attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named<MachineArchitecture>("x86-64"))
}
}
Thanks to Vampire from the Gradle Forums for the answer!
Please improve the documentation to 'tweak' 3rd party configurations by adding a Kotlin DSL example.
I got the following error after trying to apply the quarkus plugin to minimal JavaFx app:
I read the documentation on how to add the variants to the configuration (in my case with using Kotlin dsl) and after hitting my head to the wall for quite some time, I ended up with something like this:
but I got nowhere with an even more confusing error:
I also tried the following, using just Strings:
that gives me the following error:
I am clearly doing everything wrong, so an improvement in the documentation would be greatly appreciated. In the meantime, could anyone that knows how I can solve this problem using the Kotlin DSL please tell me how to do so? Thank you!