I have written a plugin with a dependency from the jcenter() repository, like this:
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
Now I want to use this plugin in a project. It turns out that I have to include the jcenter() repository in the buildscript-part, although it is not needed anywhere else. Like this:
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
url uri('http://myLocalRepo/content/repositories/releases')
}
jcenter()
}
dependencies {
classpath("com.mycompany:myPlugin:0.0.1-SNAPSHOT")
}
}
Is it possible to “inherit” the jcenter()-repository from my plugin? I do not want to force anyone using my plugin to include jcenter().
Thanks for your help, Mo