Hi,
I am writing a task for my custom plugin which has a zip file dependency. I want to add the repository to my plugin so the users of my plugin do not have to add the repository themselves (I want to keep the build.gradle as simple as possible for them).
I am doing this in my plugin to add the repository:
project.repositories.ivy {
setUrl("https://bitbucket.org/")
layout("pattern") {
artifactPattern("/[organisation]/[module]/get/[revision].[ext]")
}
}
However, when using my plugin in a project’s build.gradle I get the following error message:
You cannot mix different URL schemes for a single repository. Please declare separate repositories.
When I do not add the repository in my plugin and instead add it to the build.gradle file of the project that is using my plugin like below it works alright:
ivy {
url 'https://bitbucket.org/'
layout 'pattern', {
artifact '/[organisation]/[module]/get/[revision].[ext]'
}
}
I am using ivy with a custom pattern because the zip file dependency is in a public Bitbucket Repository.
I am not adding any other ivy repositories in my plugin.
If I omit the artifactPattern line when adding the repository it works fine (but my zip file cannot be resolved).
Running the dependency task in the project I am applying my plugin to, I cannot find any other dependencies that seem to be resolved from bitbucket via ivy. Removing all repositories in the project I am applying my plugin to did not resolve the error either.
Does anybody know why I am getting this error message and how I can fix it?
I could not find anything on this error message in the Gradle Docs.