Skip to content

Commit

Permalink
Update after_prepare.js
Browse files Browse the repository at this point in the history
fixes from comment: tkyaji#78 (comment)
  • Loading branch information
n-poireault authored Jul 9, 2019
1 parent ddee9df commit 33090d1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions hooks/after_prepare.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module.exports = function(context) {

var path = context.requireCordovaModule('path'),
fs = context.requireCordovaModule('fs'),
crypto = context.requireCordovaModule('crypto'),
Q = context.requireCordovaModule('q'),
cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util'),
var path = require('path'), fs = require('fs'), crypto = require('crypto'), Q = require('q'),

var cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util'),
platforms = context.requireCordovaModule('cordova-lib/src/platforms/platforms'),
Parser = context.requireCordovaModule('cordova-lib/src/cordova/metadata/parser'),
ParserHelper = context.requireCordovaModule('cordova-lib/src/cordova/metadata/parserhelper/ParserHelper'),
Expand Down Expand Up @@ -153,7 +151,7 @@ module.exports = function(context) {
}

function replaceCryptKey_android(pluginDir, key, iv) {
var sourceFile = path.join(pluginDir, 'com/tkyaji/cordova/DecryptResource.java');
var sourceFile = path.join(pluginDir, '../app/src/main/java/com/tkyaji/cordova/DecryptResource.java');
var content = fs.readFileSync(sourceFile, 'utf-8');

var includeArrStr = targetFiles.include.map(function(pattern) { return '"' + pattern.replace('\\', '\\\\') + '"'; }).join(', ');
Expand Down

0 comments on commit 33090d1

Please sign in to comment.