Still seem to be having problems…
I took a look at the sample/customDistribution, but that doesn’t seem to be the perfect fit with what I am trying to do.
I’ll try and explain a bit further…
We have a custom distro with custom plugins.
From the sample/customDisribution examples, the custom plugins and dependencies for the plugins are placed into the init.d/libs directory. Our custom-plugins are compiled to custom-plugins.jar, with all it’s dependencies as well…
I am trying to use the custom plugins in a custom-init.gradle so that they are applied to all projects.
I found: http://forums.gradle.org/gradle/topics/best_approach_to_apply_custom_plugin_to_root_project_via_init_script_in_a_custom_distribution
which lead me to:
which references the http://issues.gradle.org/browse/GRADLE-2407 bug BTW.
Luke shows a work around for custom-init.gradle, but the plugin class in contained with in the init.gradle file.
Our plugins are not contained in the init.gradle file, but within the jar in the init.d/ligs/custom-plugins.jar.
I cannot seem to find a way to apply the plugins in the init.gradle file, everything comes up with either Plugin ID not found or if I use the extensions.create() the class isn’t found.
extensions.create("myPlugin", com.foo.bar.MyPlugin, buildscript)
- What went wrong: Could not find property ‘com’ on root project wrapper. << points to the above line in the custom-init.gradle file for extensions.create.