I'm experimenting with putting company-wide project information in a plugin
that all of our projects can use. Adding tasks and properties were not a
problem, but I've not been able to get it to work with repositories. Here is
the test plugin:
class JeffPlugin implements Plugin<Project> {
def void apply(Project project) {
project.repositories {
mavenCentral()
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(REALM,
HOST, USER, PASSWORD);
mavenRepo urls: "http://my.example.com/m2";
}
}
}
Then in the root project's build.gradle file, I include:
apply plugin: 'jeff'
I've tried adding the above line both inside and outside of a subprojects{}
closure, but either way the build does not know how to find the dependency.
Could someone give me an idea how to do this? Thanks.
Jeff