I’m setting up a new project, and I think it’s a good fit for a multi-project. But I’m having trouble figuring out how to configure the continuous deployment. We have nexus server that our artifacts are published to and Jenkins for the build server. I have it working great for a single project.
I’m looking for a way to configure versions in Gradle to avoid version collisions which would cause Nexus to error and fail the build. Also, I’d like to minimize publishing redundant artifacts.
My version strategy is to use
And my intended project structure is:
My summarized build script is:
./gradlew clean ./gradlew build ./gradlew uploadArchives
My intention for the multi-project build is that this build script would run from MyProject for every commit in master. (Technically every push as it’s configured in WebHooks)
But under this plan if I make a change to PublicWeb and only PublicWeb, a new artifact of DomainAPI will be built and deployed. Once my API stablaizes, there will be very infrequent changes to that project. So that means there will be loads of redundant published artifacts for that subproject.
Is there a way around that, or is that just a cost of using multi-projects with automated continuous deployment?