Override jcenter() from android Studio

Hello,

build.gradle files produced by android studio refers for jcenter() in many places (buildscript, allprojects). I’ll like to use Nexus to proxify jcenter. To be able to use local artifacts on the Continuous Integration.
I’ve tried to use a init.gradle file to force the repositories :
allprojects {
repositories {
maven {
url “https://nexus/repository/maven-public/
}
jcenter {
url “https://nexus/repository/maven-public/
}
}
}
But it doesn"t works.
The only way is to remove all the jcenter() entries from the build.gradle. In this case, the local nexus is used.

So, is it possible to override this jcenter() entries without modify the build.gradle (from init.gradle or command line) ?
Thanks for your help.