Add gradle plugin to Cordova app (Android)

329 Views Asked by At

I am trying to integrate a gradle plugin (specific, Firebase Distribution but it can be any other) in my Cordova app (only for the Android side) but it keep gives me error that the plugin not found.

I am using the build-extras.gradle file as explained in the documentation like this:

 //build-extras.gradle
 buildscript {
repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
    jcenter()
    maven {
        url "https://plugins.gradle.org/m2/"
    }
}

  dependencies {
    classpath 'com.google.gms:google-services:4.3.14'
    classpath 'com.google.firebase:firebase-appdistribution-gradle:3.1.1'
   }
}

ext.postBuildExtras = {
   apply plugin: 'com.google.gms.google-services'
   apply plugin: 'com.google.firebase.appdistribution'
}

When sync gradle i am getting the following error: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'com.google.firebase.appdistribution' not found.

Any help appreciated.

0

There are 0 best solutions below