Reputation: 2492
So, I have two projects A and B. B is dependent on A and A is a library which builds a jar file.
A is configured to push the built jar to artifactory and B pulls it from artifactory. I am trying to understand if there is a way for A to push its built jar to local repo i.e. $HOME/.gradle and to push to artifactory when given artifactoryPublish. At the same time have B check the version locally and if the local version is latest than artifactory, then use the local built library.
How can this be done in grade, using build.gradle ?
Upvotes: 0
Views: 1078
Reputation: 28653
You can push 'A' to your local maven repository in ~/.m2
by applying the maven
plugin and run gradle install
. Afterwards you can 'B' let resolve it from there by adding the local maven repository to its repository definition:
repositories {
mavenLocal()
...
}
Upvotes: 1