We have a Project that contains 2 modules; web and client
The web module is a Grails application and the client module is mostly just groovy code and touch of Java code. The client module is being managed by a Gradle build script.
The Grails module has dependencies in the client module. In IntelliJ I can define that in the module config with no problems. However, when building the Grails WAR I really need to build the client JAR and have it placed in the WAR file. I’m wondering what is the best approach for this?
Here is what I ended up doing.
In my Gradle script I have the following:
I then run the uploadArchives task via Gradle. This published the JAR file to a local repos. In Grails BuildConfig.groovy I defined the following:
Now Grails sees the dependency and includes in the classpath as well as places the JAR in the WAR for me.