gradle-clojure
gradle-clojure copied to clipboard
Support for multiple source sets...
It appears that gradle-clojure only has support for the main and test source sets, but it would be nice to support other source sets too. Unfortunately, I'm not sure how to integrate such functionality into the plugin... and the Gradle docs aren't helping much either. :-( Several plugins implement this ability (the antlr, groovy, and scala plugins), so there's some scheme for doing it. It's just not clear what that scheme is.
FWIW, we need to split our application into several pieces to make sure things get compiled in the right order, and this would help in that endeavor.
Ok, that sounds reasonable. What sort of support would you want? Just that it would compile etc from other source sets too? I'll check out the other plugins to see what they do with them.
The typical methodology seems to involve creating tasks for the individual source sets. The hope here would be to do the same for Clojure, which would allow us to do things like:
compileSomeSourceSetClojure.dependsOn compileSomeOtherSourceSetClojure
I was trying to dig into other plugins to see how they implement such functionality, but it's not very clear how it works. :-(
Oh, and also allowing customization of the source sets. For example,
sourceSets {
equipment {
clojure {
compileClasspath += main.output
runtimeClasspath += main.output
}
java {
compileClasspath += main.output
runtimeClasspath += main.output
}
}
}
@jszakmeister I have implemented a POC for multiple source sets in PR #12.
Please, do let me know if you have any suggestions.
I'm definitely interested in this... I'll check it out.
I'm sorry I haven't gotten around to trying this yet. I'm hoping I get a chance to this weekend.
Similarly, my apologies for not having reviewed this yet - I was at the conj and am also travelling with my family.
@jszakmeister, @cursive-ide No worries. Let me know if you have any issues or questions when you get to it.