Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gradle default dependency management and create shadow/fat jar by using existing tools #253

Open
circlesmiler opened this issue Sep 18, 2024 · 2 comments

Comments

@circlesmiler
Copy link

circlesmiler commented Sep 18, 2024

JVarKit seems to be designed as a standalone command line tool. Therefore, all dependencies are packed into the executable jar file which is exactly what you want for using it in the most simple way on the terminal. Nice. :-)

But: If you want to use JVarKit as a library in your own project you are in trouble, because all external dependencies are packed into the jar and can collide with different library versions of your project. Normally gradle would try to handle this, but it can not "see" the dependencies in the jvarkit.jar file.

Solution: Use the "normal" dependency management in your project and use existing tools that pack the external libraries into the jar.

Question: Are there any reasons why this was not done on the first place? Otherwise, I could try to provide a PR for this.

What do you think? :-)

PS: When I look into the build.gradle file there seems to be a lot of thinks going on. I could imagine that it is not possible to use this project as a library in other projects. But maybe you could explain the problem/the requirements.

@lindenb
Copy link
Owner

lindenb commented Sep 18, 2024

@circlesmiler Hi,

I've never been able to use/learn gradle, I must be too old.

At first the java programs were standalone and generated using a Makefile, I then moved to gradle (without really understanding it) just to handle more easily(?) the maven libraries, and later, I packaged most (but not all) programs into one 'jvarkit.jar'.

Feel free to write a standard build.gradle but I can only accept the PR if, sorry, I understand the code and if I can build side projects : eg.

all2.add(task("jeter11", type: CompileJVarkit) {

P.

@circlesmiler
Copy link
Author

@lindenb Well... that is totally understandable. Thanks for the explanation and your openness.

I used gradle a lot in "normal" Java projects but also on a "normal" complexity. :-) I will discuss this with my team. I think there are some good arguments for helping out. Normally, it should be much more maintainable. But I also understand that gradle is a complete "own world" of experience. :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants