Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOP-347: fix modules loading #2

Merged
merged 4 commits into from
Feb 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/android/hooks/configure-android.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ module.exports = function (ctx) {
if (ctx.opts.platforms.indexOf('android') < 0) {
return;
}
var fs = ctx.requireCordovaModule('fs'),
path = ctx.requireCordovaModule('path'),
deferral = ctx.requireCordovaModule('q').defer();
var fs = require('fs'),
path = require('path');

function replace_string_in_file(filename, to_replace, replace_with) {
var data = fs.readFileSync(filename, 'utf8');
Expand Down Expand Up @@ -71,4 +70,4 @@ module.exports = function (ctx) {
replace_string_in_file(path.join(platformRoot, 'app/src/main/java/com/radaee/reader/PDFViewController.java'), 'private int mNavigationMode = NAVIGATION_SEEK;', 'private int mNavigationMode = NAVIGATION_THUMBS;');

replace_string_in_file(path.join(platformRoot, 'app/src/main/java/com/radaee/reader/PDFViewAct.java'), 'static protected Document ms_tran_doc;', 'static public Document ms_tran_doc;');
}
}