Include a distribution in another project


(Willie) #1

I am building plugin to deal with property files. basically, it takes one source folder, and the compiler i built (basically just project.copy) create about 30 different variations.

now, the way i package those variations are with the zip task, the jar task was just too difficult to get to publish correctly.

So, i have a build/distributions/ folder with about 30 different variations of the property files all published with different classifiers to indicate what variation it is.

Now, if the properties are a subproject of a multiproject, how do i pull that into the classpath of another project?

so in the property file project, i have this file

exp_configuration_publish\build\distributions\exp_configuration_publish-2016.0.0.11-SNAPSHOT-local-win_dev.jar

How do i include that in another project?

Now, to make it even more interesting, i have to include it in such a way where my CI server can say, don’t include it.

i always have the fun ones hu?


(Willie) #2

i tried the basic

compile fileTree(dir: "$rootProject.projectDir/properties/build/distributions/", include: ['*local-win_dev.jar'])

i can force this to work, problem is this solution is completely disconnected from the gradle workflow. so if a file changes in the properties project, the :properties:build task is never called.


(Schalk Cronjé) #3

Make arbitrary artifacts from one subproject available in another might be what you are looking for.