This only says that Project need jar1 and 2 to compile, and I guess you want to produce some complete binary from Project. If so you can dowload all your runtime deps into Project/build/lib with something like:
Thanks for response. I tried to use your suggestion:
with gradlew Project:build, but gradle generated only Project.jar. The point is that i dont need Project.jar at all, I want i want is to split all of my projects to separate files. Expected files after build:
Project\build\lib
lib.jar
jar1.jar
jar2.jar
To be honest with you i came to java world from the c# and trying to repeat things that works there: if i build whole project consist of N subprojects in c# i will get N .dll-files on output. I dont really need to build one mega .dll file with all of my dependencies. How can i perform such scenario?
Sure, that’s the way it’s supposed to work… The .java files in Project/src/main/java (or whereever) is compiled using classes from jar1 project and jar2 project.
If you then want to run some main class in Project all required jars will have to be provided as classpath to the java command (this is always slightly messy).
Let’s say “Project” is a standard java application (aka something with a main-class) that you wish to run at some point I would suggest using the “application” plugin on the “Project” project. That will take care of all this for you…