Problem
Due to a problem with jcenter
repository I need to instruct gradle to use use maven repository. I could fix the problem changing the file build.gradle
:
Original:
//...
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
//...
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
//...
Modified:
//...
buildscript {
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter()
}
//...
}
allprojects {
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter()
}
}
//...
Since this file is not versioned, and per Cordova documentation, the way to extend build.gradle
is to create a build-extras.gradle
file, I've done so and have tried to add the same content I've modified in the build.gradle
file, like:
build-extras.gradle
buildscript {
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter()
}
//...
}
allprojects {
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter()
}
}
Question
To sum up, changing the build.gradle
file works but placing the same diffed content in build-extras.gradle
it does not. Is there something that I'm missing?