Instructions to upgrade to Cordova plugin version to 9.1

This chapter describes the steps to take in order to migrate Cordova plugin to 9.1

Possible compile time error

If your app uses Jetifier to trnsform libraries then you might face a build error that looks like follow:

Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.

This is a bug in Android Gradle Plugin that should be fixed in Android Gradle Plugin 7.0

If you want to use the Onegini Cordova Plugin but can not update to latest AGP yet, the workaround suggested in the link above is to add the following setting to your gradle.properties file:

android.jetifier.blacklist = bcprov-jdk15on

To add such Gradle property to the Cordova build you can pass the additional param to the Cordova run/build command:

cordova run android -- --gradleArg=-Pandroid.jetifier.blacklist=bcprov-jdk15on

To see other options to modify the Gradle properties please follow the Cordova documentation