I have been going down the buildSrc approach for building my
build.gradle dependencies. I am starting to think this isn't the
right way.
The reason is that I want to leverage code that is in the product I am
building. Stuff like clean database, starting processes, updating
config files via APIs we built in our product.
So when I try to call classes in my src/test/etc directories,
build.gradle won't build. And if I were to put them in buildSrc, I
would have to duplicate major pieces of build.gradle in
buildSrc/build.gradle as well as if I have any code compilation issue
during development I wouldn't be able to use any tasks in build.gradle
because buildSrc/build.gradle would fail (I think anyway).
So.... I'm thinking of having another gradle file
buildGradleDependencies.gradle in my root. This would be used to
compile all the src files and build an appropriate jar file that build
be referenced in build.gradle like:
buildscript {
repositories {
flatDir(name: 'buildLib', dirs: "./lib")
}
dependencies {
classpath name: 'gradledep'
}
}
This seems clunky to me in that I will have to dupe a lot of work and
have to manually run "gradle -b buildGradleDependency buildDep" for
every change that I want to be avail to build.gradle, but I think it
will work ok.
Any other ideas?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email