Greetings!
I’m building a java library for an internal java application in my organization. The application is an ant project and has multiple components (jars), and the lib I’m building depends on one of the components. I’m wondering what is the best practice for me to use gradle to build my lib project?
I found a previous post with similar situation: Adding external projects in the gradle build path - #2 by Peter_Niederwieser that suggests to publish the dependent project to a repository which is probably not an option in my organization.
I was able to compile my lib if I declare the jar files as dependencies locally with something like:
dependencies {
implementation files('path/to/app/component1.jar')
implementation files('path/to/app/component2.jar')
}
But the problem is 1) it’s not portable and 2) I cannot do source referencing in IDEs when writing code for my lib. So I’m wondering if there is a better way to do this? I do have access to overhaul the build system of the app to gradle if that’s necessary.
Thanks in advance!