extra-java-module-info
extra-java-module-info copied to clipboard
[Maybe] Change mechanism to determine the corrdinartes of a Jar
Split out from #129
Right now, for the transform input, we only know the file name. But we would like to know the G:A
coordinates from which the Jar was downloaded. So that the user can use these instead of the Jar file name when defining a patch rule.
To determine the G:A
, we look at the file path which (usually) contains the G:A
information.
This is hacky, but the best known option.
It is a missing Gradle feature: https://github.com/gradle/gradle/issues/11831
This issue is here to record this detail in the implementation of this plugin. Maybe it can be improved with a future Gradle version.
If you run into an issue with this, where you define a rule with coordinates. E.g.:
module("some.group:some.name", "some.name")
And the plugin does not work because the Jar files name or its location is not following the expected structure, you may use the file name of the Jar as alternative:
module("some-name-1.2.jar", "some.name"
This should not happen in normal Java project setups. It may be happening if you combine this plugins with others which also register transforms and put he transform of this plugin into a transform chain.