We're receiving this error from PGB integrating plugin 'cordova-plugin-firebase'.
EDIT
Plugin in use
call-number 0.0.2
cordova-plugin-splashscreen
cordova-plugin-ionic-keyboard
cordova-plugin-file 4.3.3
cordova-plugin-compat 1.2.0
cordova-plugin-device 1.1.7
ourprojectname-plugin-firebase 2.0.5
cordova-plugin-calendar 4.6.0
cordova-plugin-statusbar 2.4.2
cordova-plugin-whitelist 1.3.3
cordova-plugin-app-event 1.2.1
cordova-android-support-gradle-release
cordova-plugin-datepicker 0.9.3
cordova-plugin-actionsheet 2.3.3
cordova-plugin-app-version 0.1.9
cordova-plugin-inappbrowser 1.7.2
cordova-plugin-file-transfer 1.6.3
cordova-plugin-network-information 1.3.4
cordova-plugin-camera 2.4.1 >
cordova-plugin-media-capture 1.4.3
PGB configuration
<engine name="ios" spec="4.5.4" />
<engine name="android" spec="6.3.0" />
<preference name="phonegap-version" value="cli-7.1.0" />
<preference name="pgb-builder-version" value="1" />
Cordova cli 7.1.0
Android Studio 3.0.1
FAILURE: Build failed with an exception.
* Where:
Script '/project/ourprojectname-plugin-firebase/ourprojectname-build.gradle' line: 28
* What went wrong:
A problem occurred evaluating root project 'project'.
> Plugin with id 'com.google.gms.google-services' not found.
Plugin was customized and currently push as a npm package currently. Here it's build.gradle file
buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:+' classpath 'com.google.gms:google-services:+' // Updated from 'com.google.gms:google-services:4.1.0' } } repositories { mavenCentral() maven { url "https://maven.google.com" } } dependencies { compile 'me.leolin:ShortcutBadger:1.1.4@aar' compile project(':CordovaLib') // Android studio project build requirement compile 'com.google.firebase:firebase-auth:+' compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') { transitive = true } } cdvPluginPostBuildExtras.add({ apply plugin: 'com.google.gms.google-services' apply plugin: 'io.fabric' })
The classpath "com.google.gms:google-services" was updated with "+" due to the fact that locally on Android Studio is building correctly.
Question
1) Is some way to pass a custom gradle configuration to PGB ?
2) If not, how is possible to fix error reported ?
EDIT
About first question, we discover app-extras.gradle way to override or add some configuration for Android but is not enough.
Currently only way to build successfully android app is to use this suggestion:
https://stackoverflow.com/a/44364851/6859885
And some other fix for externalizated plugin:
1) compile project(':CordovaLib') that allow to fix some dependencies for gradle about cordova test's method implementation;
2) Adding classpath 'com.google.gms:google-services:+ in plugin dependencies avoiding to specify package version due to a version conflicts between plugin in use.
Thanks in advance.