diff --git a/framework/build.gradle b/framework/build.gradle index 8ee8ca09..38cd42d7 100644 --- a/framework/build.gradle +++ b/framework/build.gradle @@ -29,7 +29,13 @@ buildscript { } allprojects { - apply from: 'repositories.gradle' + def hasRepositoriesGradle = file('repositories.gradle').exists() + if (hasRepositoriesGradle) { + apply from: 'repositories.gradle' + } else { + apply from: "${project.rootDir}/repositories.gradle" + } + repositories repos } diff --git a/templates/project/app/build.gradle b/templates/project/app/build.gradle index f1b41d70..08959e08 100644 --- a/templates/project/app/build.gradle +++ b/templates/project/app/build.gradle @@ -60,7 +60,13 @@ buildscript { // Allow plugins to declare Maven dependencies via build-extras.gradle. allprojects { - apply from: 'repositories.gradle' + def hasRepositoriesGradle = file('repositories.gradle').exists() + if (hasRepositoriesGradle) { + apply from: 'repositories.gradle' + } else { + apply from: "${project.rootDir}/repositories.gradle" + } + repositories repos } diff --git a/templates/project/build.gradle b/templates/project/build.gradle index 1e01f06e..949bc3fa 100644 --- a/templates/project/build.gradle +++ b/templates/project/build.gradle @@ -30,7 +30,13 @@ buildscript { } allprojects { - apply from: 'repositories.gradle' + def hasRepositoriesGradle = file('repositories.gradle').exists() + if (hasRepositoriesGradle) { + apply from: 'repositories.gradle' + } else { + apply from: "${project.rootDir}/repositories.gradle" + } + repositories repos }