I have multiple files in my gradle build. In one file, I define my repositories. For example, repos.gradle
looks like:
buildscript {
repositories {
maven {
url "nexus url"
}
}
}
Now, in my projects build script, my project.gradle
looks like:
apply from: "repos.gradle"
buildscript {
dependencies {
classpath "some:library:version"
}
}
This fails to build, with an error along the lines of unable to add dependency because no repositories are defined
. If I define everything in the project.gradle
file, everything works.
How can I inherit the repository definition? I have many many projects, and want to use the one definition in case it changes.