[GRADLE-2914] thirdparty plugins in settings.gradle cannot be applied by id Created: 04/Oct/13 Updated: 10/Feb/17 Resolved: 10/Feb/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 1 |
Description |
I'm running into a minor problem, when applying a plugin in `settings.gradle`, running Gradle 1.8. When I apply it like this: apply plugin: 'my-plugin' buildscript { dependencies.classpath 'com.mycompany:myplugins:1.0.0' I get this error:
The `META-INF/gradle-plugins/my-plugin.properties` file seems to be fine, and when I use the class name, it works: apply plugin: com.mycompany.MyPlugin In the same Jar I have a couple of plugins that are applied to `Project`, and all of them work as expected. |
Comments |
Comment by Gradle Forums [ 04/Oct/13 ] |
Hey, Did you try to apply this plugin in a regular build.gradle file? |
Comment by Gradle Forums [ 04/Oct/13 ] |
I thought about this a bit more. I haven't seen a use case for applying plugins in settings.gradle, yet. Typical Gradle plugin is an object that is a applied to a 'project' instance (e.g. implements Plugin) . In settings.gradle, there's no 'project' instance yet, because the it's the settings.gradle that defines the projects. You can try writing the plugin that implements Plugin and apply it in the settings.gradle. I cannot try it out right now and I'm not sure if that's what you want. The bottom line is that you cannot use a regular plugin in settings.gradle because regular plugin are intended to be applied to 'project' instances. Hope that helps! |
Comment by Benjamin Muschko [ 15/Nov/16 ] |
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle! |
Comment by Benjamin Muschko [ 10/Feb/17 ] |
Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved. |