Open TheBatOutOfHell opened 1 year ago
Seems that I was able to solve both the deployment and version issues by just placing the version = ...
part in an afterEvaluate { ... }
block and removing the overrides in the child project altogether.
So now I only have artifactory { ... }
configuration in buildSrc groovy script and no additional artifactory config for any of the projects... just applying conventions plugin where needed...
How can we help?
Hello!
I am working on different projects with multiple artifacts (usually war and jar) which I all have configured similarly as multi module projects with a root project. And we are using artifactory plugin. In a recent question in Gradle Forum recommendations were to use conventions plugin to share logic between subprojects instead of
allprojects { ... }
orsubprojects { ... }
blocks. But I cannot get the artifactory configuration to work within the buildSrc-setup.My Setup before adding buildSrc module was like:
So my initial working setup for the artifactory plugin was:
in root project build.xml I have somethings like:
One problem I had with this was, that setting the version this way (last line in the script) did not work for the subprojects. version always endet up as "SNAPSHOT". Now my solution in suprojects basically was overriding the version setting in subprojects:
So one question (out of context) would be: is there a better solution to set the version?
But to the point: I set up a buildSrc module with some working configurations. I then wanted to move artifactory closure to the myproject.conventions.gradle file. There is no error upon running artifactoryPublish, but it is also not deploying any artifacts.
So my core question: What would be the recommended way of or is there some example how to setup artifactory plugin with conventions plugin mechanism?
Thx. Rob