-
Notifications
You must be signed in to change notification settings - Fork 23
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
Behavior when applying via plugins block and "apply plugin" are different #12
Comments
That's really weird. Can you give me more details about your setup — Gradle version, Eclipse version, plugin version? (Ideally attach a repro zip, if you have time.) |
Tried with:
In case it matters, I was trying to use org.immutables:value:2.0.21. The failing setup looked like:
And the working setup like:
|
Could you post the output of
(Sorry, just want to double-check there are no weird modified Gradles being pulled in somehow.) |
|
Ok, I think I found it; apparently the order in fails to fix classpath:
correct classpath:
|
O.o omg |
Yeah, worse yet, if I mutate the working version to swap eclipse for baseline, things fail again (baseline-eclipse applies the eclipse plugin):
...but I'll follow up with @uschi2000 about that. Anyway, short of filing a Gradle bug I don't think there's things to be done here. |
I'll leave this open and check there's nothing going wrong in the plugin. Thanks for figuring this out! |
Booooo Gradle.... I thought the whole point of the "declarative" |
We may be doing something dodgy in the gradle-processors plugin, though. |
In the plugins{} syntax, when is Plugin#apply expected to run? I don't think order independence can work once plugins extend behaviour of others. |
We take the approach of installing a task that runs after the java/eclipse/etc plugin runs. It may be there is an ordering issue happening there, I suppose. |
Sorry it's taken me so long to address this. I was bamboozled by being apparently unable to replicate it with plugins {
id 'eclipse'
id 'java'
id 'org.inferred.processors' version '1.1'
} This appears to be equivalent to: apply plugin: 'org.inferred.processors'
apply plugin: 'eclipse'
apply plugin: 'java' or possibly: apply plugin: 'eclipse'
apply plugin: 'org.inferred.processors'
apply plugin: 'java' Weird. |
could the ordering issues be avoided if we just do the work in an |
Sadly, no, we need to do the work before the project is evaluated. I have a PR in review that fixes the issue, though. |
This is fixed in v1.2.3. Sorry for the delay, everyone! |
When applied through the
plugins
closure on a top level project, the processors jar is not added to Eclipse classpath. In the same project, if applied throughapply plugin
, the processors jar is added to the Eclipse classpath. I expect the latter behavior.The text was updated successfully, but these errors were encountered: