Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple source sets... #11

Open
jszakmeister opened this issue Nov 10, 2016 · 8 comments
Open

Support for multiple source sets... #11

jszakmeister opened this issue Nov 10, 2016 · 8 comments

Comments

@jszakmeister
Copy link

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.

@cursive-ide
Copy link
Owner

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.

@jszakmeister
Copy link
Author

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. :-(

@jszakmeister
Copy link
Author

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
        }
    }
}

pbzdyl added a commit to pbzdyl/gradle-clojure that referenced this issue Nov 25, 2016
…ic support for Gradle incremental tasks (issue cursive-ide#10).

When Gradle detects there were no changes to the input files, it won't call Clojure compile task at all.
pbzdyl added a commit to pbzdyl/gradle-clojure that referenced this issue Nov 25, 2016
…ic support for Gradle incremental tasks (issue cursive-ide#10).

When Gradle detects there were no changes to the input files, it won't call Clojure compile task at all.
@pbzdyl
Copy link
Contributor

pbzdyl commented Nov 25, 2016

@jszakmeister I have implemented a POC for multiple source sets in PR #12.

Please, do let me know if you have any suggestions.

@jszakmeister
Copy link
Author

I'm definitely interested in this... I'll check it out.

pbzdyl added a commit to pbzdyl/gradle-clojure that referenced this issue Nov 28, 2016
…ic support for Gradle incremental tasks (issue cursive-ide#10).

When Gradle detects there were no changes to the input files, it won't call Clojure compile task at all.
pbzdyl added a commit to pbzdyl/gradle-clojure that referenced this issue Dec 2, 2016
…ic support for Gradle incremental tasks (issue cursive-ide#10).

When Gradle detects there were no changes to the input files, it won't call Clojure compile task at all.
@jszakmeister
Copy link
Author

I'm sorry I haven't gotten around to trying this yet. I'm hoping I get a chance to this weekend.

@cursive-ide
Copy link
Owner

Similarly, my apologies for not having reviewed this yet - I was at the conj and am also travelling with my family.

@pbzdyl
Copy link
Contributor

pbzdyl commented Dec 9, 2016

@jszakmeister, @cursive-ide No worries. Let me know if you have any issues or questions when you get to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants