Gradle Shadow:如何包括一些包裹
I have this dependency, I want to include this in the jar without minimizing it.
But that will exclude some important classes.
So I tried to use include dependency.
But that will include all the classes.
How can I use the custom filter with code?
Or include special packages of dependency in the jar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有默认选项可以包括JAR(依赖项)中的部分类。
您拥有的两个选项是
,如果这是一个“很少”更改的类
用所需的类手动创建一个自定义罐子
中使用它,如果这是“经常”更改的类
在JAR和课后之前创建一个任务,以将需要的类提取到build /../类文件夹
there are no default options to include partial set of classes from a jar (dependency).
The 2 options you have are
if this is a 'rarely' changing set of classes
manually create a custom jar with the classes you need, save it local to project or in nexus and use it in the include
if this is a 'often' changing set of classes
create a task, before jar and after classes, to extract the classes you need in to the build/../classes folder