implementation “com.sun.xml.bind:jaxb-impl:2.3.3”
What’s your approach of implementing JDK 11-specifics? I have a custom gradle file containing statements like the following:
if (JavaVersion.current().isJava8())
{
return
}
dependencies
{
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
}
An din build.gradle
:
apply from: 'buildSrc/src/main/java/BuildByJdk11Workarounds.gradle'
Is this possible with the current version of Gradle? By declaring a variant of the default capability?
Did you already had a look at the official docs? Those sound to me like your goal could be reached by using Gradle Module Metadata:
https://docs.gradle.org/current/userguide/variant_model.html#sec:mapping-maven-ivy-to-variants
https://docs.gradle.org/current/userguide/component_metadata_rules.html
Crosspost: