I have the following in my build.gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'http://dl.bintray.com/content/noamt/gradle-plugins' }
}
dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.2.3'
}
}
plugins {
id "com.moowork.gulp" version "0.13"
id "com.moowork.node" version "0.13"
// id "com.bmuschko.cargo" version "2.2.1"
}
apply plugin: 'com.bmuschko.cargo'
However, when I try to run a cargo task I get the following error:
Cannot resolve external dependency org.codehaus.cargo:cargo-core-uberjar:1.4.15 because no repositories are defined.
Turns out the answer is to ensure that mavenCentral() is defined at the top level of the project. Placing it at the subproject level does not allow the plugin artifacts to be correctly resolved.
repositories {
mavenCentral()
}