Allow to exclude only some artifacts of a transitive dependency #22704
Labels
closed:not-fixed
Indicates the issue was not fixed and is not planned to be
in:dependency-declarations
variant notation attributes capability substitution
I am using the org.bytedeco:ffmpeg-platform library which is, I think, an aggregator dependency like junit-jupiter except that junit-jupiter aggregates some separate dependencies but ffmpeg-platform aggregates some artifacts of a single dependency (org.bytedeco:ffmpeg).
The problem is, it brings many JARs that in total are about 250 MB and I don't need them all for my GUI application for one OS/architecture. How can I use the org.bytedeco:ffmpeg-platform library and exclude some of the transitive artifacts it brings?
For example, I tried to use classifiers like the following to exclude
linux-x86
JAR artifact but it doesn't work:Expected Behavior
To be able to exclude some artifacts of transitive dependencies.
Current Behavior
Gradle brings all artifacts of transitive dependencies.
Context
My current solution is to not use the org.bytedeco:ffmpeg-platform aggregator dependency and use the org.bytedeco:ffmpeg directly and include my desired artifacts one by one with classifiers:
Another example library
For another similar aggregator dependency which brings artifacts of another dependency see jna-platform which brings jna artifacts.
The text was updated successfully, but these errors were encountered: