Is there an example of a plugin that provides tasks which the plugin uses itself via an "apply plugin: 'me'" construct?

(Paul Michael Reilly) #1

I am writing a “release” plugin which works fine when testing with a dummy project. Now I want to use the plugin to release itself and I am baffled on how to make it work. I have:

buildscript {

repositories {


url: uri(System.getProperty(“user.home”) + ‘/.repo’)


dependencies {

classpath ‘com.brightcove:gradle-release-plugin:1.0.0-SNAPSHOT’



when I try to run Gradle with this build script, the following error is reported:

A problem occurred configuring root project ‘gradle-release-plugin’. > Could not resolve all dependencies for configuration ‘:classpath’.

Module version com.brightcove:gradle-release-plugin:1.0.0-SNAPSHOT, configuration ‘classpath’ declares a dependency on configuration ‘default’ which is not declared in the module descriptor for com.brightcove:gradle-release-plugin:1.0.0-SNAPSHOT

Even with --debug output, the message still does not make any sense to me. Can someone shed any light on what might be wrong and how to fix it? fwiw, this is with Gradle 1.11

(Peter Niederwieser) #2

For one thing, the Maven repo declaration is wrong (unless this is a forum formatting issue).

(Paul Michael Reilly) #3

You’re point is well taken, my bad. I have used a number of formats (mavenLocal(), maven {url uri(System.getProperty(“user.home”) + ‘/.repo’)}, etc. obtaining the same result. It occurs to me now that maybe it is a clue that even incorrect declaration yields the same error. In any case, I would like to know how you interpret the error message assuming the repository syntax is correct. I certainly can provide the mavenLocal() example instead, if need be. But the error is the same.

(Paul Michael Reilly) #4

And my grammar is awful too. “Your point is well taken”, it should have been.

(Peter Niederwieser) #5

It might be a problem related to using the plugin on its own project. Perhaps try with a non-snapshot version, i.e. point it to an older version of itself that comes from the repo.

(Paul Michael Reilly) #6

Good suggestion. I have found that if the installed version and the source version have the same version id, I get the error. If the two versions are different, the error does not occur. I’ll take your word for it, that this is either a feature, a bug or an anomaly. In any case, thanks for your input.

(Jacob Tomaw) #7

I have run into the same issue. I have a plugin named orbitz-ci in the group com.orbitz.gradle. When I try to bootstrap by adding any version as a classpath dependency of the build script I get “configuration ‘classpath’ declares a dependency on configuration ‘default’”. However if I change the group to something different I am able to correctly include the plug in.

Is it not possible to bootstrap at all?