From 5bd5e1cd32e443c7d6ae29cc3e9f9dfd42ebf58d Mon Sep 17 00:00:00 2001 From: soumak77 Date: Fri, 28 Sep 2018 00:36:02 -0700 Subject: [PATCH] remove google repo fixes #881 --- scripts/lib/android-helper.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/lib/android-helper.js b/scripts/lib/android-helper.js index 87006f573..a7e2e3a8f 100644 --- a/scripts/lib/android-helper.js +++ b/scripts/lib/android-helper.js @@ -21,18 +21,18 @@ function addDependencies(buildGradle) { // find the known line to match var match = buildGradle.match(/^(\s*)classpath 'com.android.tools.build(.*)/m); var whitespace = match[1]; - + // modify the line to add the necessary dependencies var googlePlayDependency = whitespace + 'classpath \'com.google.gms:google-services:4.1.0\' // google-services dependency from cordova-plugin-firebase'; var fabricDependency = whitespace + 'classpath \'io.fabric.tools:gradle:1.25.4\' // fabric dependency from cordova-plugin-firebase' var modifiedLine = match[0] + '\n' + googlePlayDependency + '\n' + fabricDependency; - + // modify the actual line return buildGradle.replace(/^(\s*)classpath 'com.android.tools.build(.*)/m, modifiedLine); } /* - * Add 'google()' to the repository repo list + * Add Crashlytics repos to the repository list */ function addRepos(buildGradle) { // find the known line to match @@ -40,9 +40,8 @@ function addRepos(buildGradle) { var whitespace = match[1]; // modify the line to add the necessary repo - var googlesMavenRepo = whitespace + 'google() // Google\'s Maven repository from cordova-plugin-firebase'; var fabricMavenRepo = whitespace + 'maven { url \'https://maven.fabric.io/public\' } // Fabrics Maven repository from cordova-plugin-firebase' - var modifiedLine = match[0] + '\n' + googlesMavenRepo + '\n' + fabricMavenRepo; + var modifiedLine = match[0] + '\n' + fabricMavenRepo; // modify the actual line return buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); @@ -68,7 +67,7 @@ module.exports = { // Add Google Play Services Dependency buildGradle = addDependencies(buildGradle); - + // Add Google's Maven Repo buildGradle = addRepos(buildGradle); @@ -85,7 +84,7 @@ module.exports = { // remove any lines we added buildGradle = buildGradle.replace(/(?:^|\r?\n)(.*)cordova-plugin-firebase*?(?=$|\r?\n)/g, ''); - + writeRootBuildGradle(buildGradle); } -}; \ No newline at end of file +};