Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var path = require('path');
var fs = require('fs');
var Q = require('q');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf')
var cordova = require('cordova-lib');
var glob = require('glob');
var CONFIG_XML = "";
var STRING_XML = '';
var ANDROID_MANIFEST = "";
var PLUGIN_GRADLE = "dependencies {compile fileTree(dir: 'libs', include: '*.jar')\n// SUB-PROJECT DEPENDENCIES START\n\n// SUB-PROJECT DEPENDENCIES END\n}\n// PLUGIN GRADLE EXTENSIONS START\n// PLUGIN GRADLE EXTENSIONS END";
var PLATFORM_DIR = path.resolve(__dirname, '../platforms/android');
cordova.events.on('verbose', console.log.bind(console));
cordova.events.on('log', console.log.bind(console));
function Android(projectRoot) {
this.projectRoot = projectRoot;
}
Android.prototype.init = function () {
if (this.isInitialized) {
return;
}
createDirectories(['src', 'libs', 'res/xml', 'res/values', 'assets/www']);
writeIfNotExists('res/xml/config.xml', CONFIG_XML);
writeIfNotExists('res/values/strings.xml', STRING_XML);
writeIfNotExists('project.properties', '');
writeIfNotExists('plugin-build.gradle', PLUGIN_GRADLE);
writeIfNotExists('AndroidManifest.xml', ANDROID_MANIFEST);
var fs = require('fs');
var Q = require('q');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf')
var cordova = require('cordova-lib');
var glob = require('glob');
var CONFIG_XML = "";
var STRING_XML = '';
var ANDROID_MANIFEST = "";
var PLUGIN_GRADLE = "dependencies {compile fileTree(dir: 'libs', include: '*.jar')\n// SUB-PROJECT DEPENDENCIES START\n\n// SUB-PROJECT DEPENDENCIES END\n}\n// PLUGIN GRADLE EXTENSIONS START\n// PLUGIN GRADLE EXTENSIONS END";
var PLATFORM_DIR = path.resolve(__dirname, '../platforms/android');
cordova.events.on('verbose', console.log.bind(console));
cordova.events.on('log', console.log.bind(console));
function Android(projectRoot) {
this.projectRoot = projectRoot;
}
Android.prototype.init = function () {
if (this.isInitialized) {
return;
}
createDirectories(['src', 'libs', 'res/xml', 'res/values', 'assets/www']);
writeIfNotExists('res/xml/config.xml', CONFIG_XML);
writeIfNotExists('res/values/strings.xml', STRING_XML);
writeIfNotExists('project.properties', '');
writeIfNotExists('plugin-build.gradle', PLUGIN_GRADLE);
writeIfNotExists('AndroidManifest.xml', ANDROID_MANIFEST);
console.log('Initialized Android resources');
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
var nopt = require('nopt');
var updateNotifier = require('update-notifier');
var pkg = require('../package.json');
var telemetry = require('./telemetry');
var help = require('./help');
var cordova_lib = require('cordova-lib');
var CordovaError = cordova_lib.CordovaError;
var cordova = cordova_lib.cordova;
var events = cordova_lib.events;
var logger = require('cordova-common').CordovaLogger.get();
var cordovaCreate = require('cordova-create');
var Configstore = require('configstore');
var conf = new Configstore(pkg.name + '-config');
var editor = require('editor');
const semver = require('semver');
// process.version is not declared writable or has no setter so storing in const for Jasmine.
const NODE_VERSION = process.version;
// When there is no node version in the deprecation stage, set to null or false.
const NODE_VERSION_REQUIREMENT = '>=8';
const NODE_VERSION_DEPRECATING_RANGE = '<10';
var knownOpts = {
verbose: Boolean,
/*
* Extracted from https://github.com/apache/cordova-cli/blob/master/src/cli.js
*
* gulp-cordova
* https://github.com/rcsole/gulp-cordova
*
* Copyright (c) 2015 Ricard Solé Casas
* Licensed under the MIT license.
*/
const cordova_lib = require('cordova-lib')
const _ = require('lodash')
const cordova = cordova_lib.cordova
const events = cordova_lib.events
const fs = require('fs')
function cordovaWrapper(commandArray, next) {
var cmd = commandArray[0]
var subcommand
var msg
var known_platforms = Object.keys(cordova_lib.cordova_platforms)
/**
* Output the error in terminal/console
* @param dbgMsg
*/
function callback (dbgMsg) {
console.log(dbgMsg);
}