Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Support new Gradle dependency configurations. See dpa99c/cordova-andr…
Browse files Browse the repository at this point in the history
…oid-support-gradle-release#37.

Replace requireCordovaModules() with require() to support cordova@9. See dpa99c/cordova-custom-config#152.
  • Loading branch information
dpa99c committed Mar 26, 2019
1 parent d43fb29 commit 5cac6c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -5,6 +5,7 @@
"author": "Dave Alden",
"license": "MIT",
"dependencies": {
"q": "^1.4.1",
"xml2js": "~0.4.19",
"semver": "5.1.0"
},
Expand Down
10 changes: 8 additions & 2 deletions scripts/apply-changes.js
@@ -1,5 +1,5 @@
var PLUGIN_NAME = "cordova-android-firebase-gradle-release";
var PACKAGE_PATTERN = /(compile "com.google.firebase:[^:]+:)([^"]+)"/g;
var PACKAGE_PATTERN = /(compile|implementation|api|annotationProcessor)( "com.google.firebase:[^:]+:)([^"]+)"/g;
var PLUGIN_GRADLE_FOLDER_PATH = "platforms/android/"+PLUGIN_NAME;
var VERSION_PATTERN = /def FIREBASE_VERSION = "[^"]+"/;
var VERSION_TEMPLATE = "def FIREBASE_VERSION = \"<VERSION>\"";
Expand Down Expand Up @@ -101,7 +101,13 @@ function attempt(fn) {
}

module.exports = function (ctx) {
deferral = ctx.requireCordovaModule('q').defer();
try{
deferral = require('q').defer();
}catch(e){
e.message = 'Unable to load node module dependency \'q\': '+e.message;
log(e.message);
throw e;
}
attempt(run)();
return deferral.promise;
};

0 comments on commit 5cac6c2

Please sign in to comment.