From 09256b766f2d71863693c27996329e59909fec11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Fri, 17 Jan 2020 08:22:06 +0900 Subject: [PATCH] chore: rename gradle plugin google services preference options (#898) --- bin/templates/project/app/build.gradle | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/templates/project/app/build.gradle b/bin/templates/project/app/build.gradle index 47cef0d1..2db1aa65 100644 --- a/bin/templates/project/app/build.gradle +++ b/bin/templates/project/app/build.gradle @@ -31,23 +31,23 @@ buildscript { classpath 'com.android.tools.build:gradle:3.3.0' - if(cdvHelpers.getConfigPreference('GoogleServicesEnabled', 'false').toBoolean()) { - String defaultGoogleServiceVersion = '4.2.0' + if(cdvHelpers.getConfigPreference('GradlePluginGoogleServicesEnabled', 'false').toBoolean()) { + String defaultGradlePluginGoogleServicesVersion = '4.2.0' /** * Fetches the user's defined Google Services Plugin Version from config.xml. - * If the version is not set or invalid, it will default to the ${defaultGoogleServiceVersion} + * If the version is not set or invalid, it will default to the ${defaultGradlePluginGoogleServicesVersion} */ - String googleServicesVersion = cdvHelpers.getConfigPreference('GoogleServicesVersion', defaultGoogleServiceVersion) - if(!cdvHelpers.isVersionValid(googleServicesVersion)) { - println("The defined Google Services plugin version (${googleServicesVersion}) does not appear to be a valid version. Falling back to version: ${defaultGoogleServiceVersion}.") - googleServicesVersion = defaultGoogleServiceVersion + String gradlePluginGoogleServicesVersion = cdvHelpers.getConfigPreference('GradlePluginGoogleServicesVersion', defaultGradlePluginGoogleServicesVersion) + if(!cdvHelpers.isVersionValid(gradlePluginGoogleServicesVersion)) { + println("The defined Google Services plugin version (${gradlePluginGoogleServicesVersion}) does not appear to be a valid version. Falling back to version: ${defaultGradlePluginGoogleServicesVersion}.") + gradlePluginGoogleServicesVersion = defaultGradlePluginGoogleServicesVersion } // Create the Google Services classpath and set it. - String googleServicesClassPath = "com.google.gms:google-services:${googleServicesVersion}" - println "Adding classpath: ${googleServicesClassPath}" - classpath googleServicesClassPath + String gradlePluginGoogleServicesClassPath = "com.google.gms:google-services:${gradlePluginGoogleServicesVersion}" + println "Adding classpath: ${gradlePluginGoogleServicesClassPath}" + classpath gradlePluginGoogleServicesClassPath } } } @@ -378,6 +378,6 @@ if (hasProperty('postBuildExtras')) { postBuildExtras() } -if (cdvHelpers.getConfigPreference('GoogleServicesEnabled', 'false').toBoolean()) { +if (cdvHelpers.getConfigPreference('GradlePluginGoogleServicesEnabled', 'false').toBoolean()) { apply plugin: 'com.google.gms.google-services' }