|
|
@@ -0,0 +1,29 @@
|
|
|
+const fs = require("fs");
|
|
|
+const path = require("path");
|
|
|
+module.exports = function (context) {
|
|
|
+ const projectRoot = context.opts.projectRoot;
|
|
|
+
|
|
|
+ const cordovaCommon = context.requireCordovaModule("cordova-common");
|
|
|
+ const { ConfigParser } = cordovaCommon;
|
|
|
+ const appConfig = new ConfigParser(path.resolve(projectRoot, "config.xml"));
|
|
|
+ let projectName = appConfig.name();
|
|
|
+ const file = path.resolve(
|
|
|
+ projectRoot,
|
|
|
+ "platforms",
|
|
|
+ "android",
|
|
|
+ "app",
|
|
|
+ "src",
|
|
|
+ "main",
|
|
|
+ "java",
|
|
|
+ "com",
|
|
|
+ "agomezmoron",
|
|
|
+ "SaveImageGallery",
|
|
|
+ "SaveImageGallery.java"
|
|
|
+ );
|
|
|
+ let content = fs
|
|
|
+ .readFileSync(file)
|
|
|
+ .toString()
|
|
|
+ .replace("check >= 1", "true");
|
|
|
+
|
|
|
+ fs.writeFileSync(file, content);
|
|
|
+};
|