I have a gradle project and I want to add a .jar and attach its source to the "Project and External Dependencies" folder when it builds. Adding the .jar bit is fine, I can do that. Added the line
compile files('lib/choco-solver-4.10.0.jar')
under the dependencies{}
section and it does it just fine. No problems.
I have choco-solver-4.10.0-sources.jar
as well, which is the source code for the choco-solver-4.10.0.jar
. I want this source code so that i can dig into the code of it when debugging/coding.
I don't know how and can't find a way (after 45 minutes of googling searching) to attach the source code to this so that it ends up with the .jar in "Project and External Dependencies" attached to choco-solver-4.10.0.jar
. If someone could point me to a previously answered question or google result that shows me to do this i'd be equally as grateful as if someone gave me an answer here.
I can add choco-solver-4.10.0.jar
to the build path of the Eclipse project, but that doesn't seem to help in getting it to sort itself out with Gradle.
I'm genuinely at a loss at the moment. Thanks in advance for any help. Bear in mind that I am a Mathematics graduate who has been coding in java less than a year, and this sort of stuff is very new to me.