I’m developing a Gradle plugin that automatically tweaks a POM file generated by
Upload tasks with
mavenDeployer – by tweaking
(JFYI details: It adds a new custom configuration, adds direct dependencies on the new configuration, and registers the new configuration for Maven’s
runtime scope. Directly tweaking Gradle’s
runtime configuration does not work unfortunately because the added dependencies are calculated from existing
conf2ScopeMappings does not work for
conf2ScopeMappings are expected to be deprecated in future.
mavenplugin (together with the core
Uploadtask) are being replaced by the
maven-publishplugin. As such, we don’t plan on making changes to improve the (now legacy)
Expect to see this type deprecated in Gradle 6.x, for possible removal in Gradle 7.0.
Then, I’m looking for an alternative way to
maven-publish to tweak a mapping from Gradle configurations to Maven scopes.
I tried adding an attribute
Usage.JAVA_RUNTIME to the new configuration, but it didn’t work.
alternativeRuntimeConfiguration.getAttributes().attribute( Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, Usage.JAVA_RUNTIME));
Does anyone know any way?