diff --git a/.gitignore b/.gitignore index 82315c4..2838fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,3 @@ build/Release # Deployed apps should consider commenting this line out: # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git node_modules -yarn.lock diff --git a/index.js b/index.js index 23209ca..63ce741 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,6 @@ var colors = require('colors'); var _ = require('underscore'); var Q = require('q'); var argv = require('minimist')(process.argv.slice(2)); -var semver = require('semver'); /** * @var {Object} settings - names of the config file and of the icon image @@ -16,22 +15,6 @@ settings.CONFIG_FILE = argv.config || 'config.xml'; settings.ICON_FILE = argv.icon || 'icon.png'; settings.OLD_XCODE_PATH = argv['xcode-old'] || false; - -/** - * Get Android Folder based on Android Platform version - */ -var getAndroidFolder = function(){ - var androidFolder = 'platforms/android/app/src/main/res/'; //as of cordova-android@7.0.0 - if(!fs.existsSync('platforms/android/cordova/version')){ - return androidFolder; - } - if(semver.lt(require('../../platforms/android/cordova/version').version, '7.0.0')){ - androidFolder = 'platforms/android/res/'; - } - return androidFolder; -} - - /** * Check which platforms are added to the project and return their icon names and sizes * @@ -86,7 +69,7 @@ var getPlatforms = function (projectName) { platforms.push({ name : 'android', isAdded : fs.existsSync('platforms/android'), - iconsPath : getAndroidFolder(), + iconsPath : 'platforms/android/res/', icons : [ { name : 'drawable/icon.png', size : 96 }, { name : 'drawable-hdpi/icon.png', size : 72 }, diff --git a/package.json b/package.json index 3dfa79e..9700ede 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "imagemagick": "^0.1.3", "minimist": "^1.2.0", "q": "^1.0.1", - "semver": "^5.5.0", "underscore": "^1.6.0", "xml2js": "^0.4.3" }