From 7caa96abcdfee71712a7a4e8aa65b128e3f6efc4 Mon Sep 17 00:00:00 2001 From: Ian Clelland Date: Wed, 20 Aug 2014 11:17:04 -0400 Subject: [PATCH] Fix previous merges Build scripts (create and build) were mangled somewhat by the previous merge commits. This resets them to (almost) exactly the same state as the 3.6.x (master) branch. Conflicts: bin/lib/create.js --- bin/lib/create.js | 18 ------------------ bin/templates/cordova/lib/build.js | 1 - 2 files changed, 19 deletions(-) diff --git a/bin/lib/create.js b/bin/lib/create.js index 6a5fe576..4b340c60 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -119,7 +119,6 @@ function writeProjectProperties(projectPath, target_api, shared) { function copyBuildRules(projectPath) { var srcDir = path.join(ROOT, 'bin', 'templates', 'project'); - shell.cp('-f', path.join(srcDir, 'custom_rules.xml'), projectPath); shell.cp('-f', path.join(srcDir, 'build.gradle'), projectPath); shell.cp('-f', path.join(srcDir, 'settings.gradle'), projectPath); @@ -139,13 +138,6 @@ function copyScripts(projectPath) { shell.cp(path.join(ROOT, 'bin', 'lib', 'android_sdk_version.js'), path.join(projectPath, 'cordova', 'lib', 'android_sdk_version.js')); } -function copyGradleWrapper(sdkPath, projectPath) { - var wrapperDir = path.join(sdkPath, 'tools', 'templates','gradle','wrapper'); - shell.cp(path.join(wrapperDir, 'gradlew'), projectPath); - shell.cp(path.join(wrapperDir, 'gradlew.bat'), projectPath); - shell.cp('-r', path.join(wrapperDir, 'gradle'), projectPath); -} - /** * Test whether a package name is acceptable for use as an android project. * Returns a promise, fulfilled if the package name is acceptable; rejected @@ -254,16 +246,6 @@ exports.createProject = function(project_path, package_name, project_name, proje shell.cp('-r', path.join(ROOT, 'framework', 'res', 'xml'), path.join(project_path, 'res')); shell.cp(path.join(project_template_dir, 'gitignore'), path.join(project_path, '.gitignore')); - shell.cp('-f', path.join(project_template_dir, 'build.gradle'), project_path); - shell.cp('-f', path.join(project_template_dir, 'libraries.gradle'), project_path); - shell.cp('-f', path.join(project_template_dir, 'settings.gradle'), project_path); - check_reqs.sdk_dir().then(function(dir) { - console.log("Copying Gradle wrapper from " + dir); - copyGradleWrapper(dir, project_path); - }).catch(function(err) { - console.log("Cannot find Android SDK. Not installing Gradle wrapper."); - }); - // Manually create directories that would be empty within the template (since git doesn't track directories). shell.mkdir(path.join(project_path, 'libs')); diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js index 7d8828db..1f4810d0 100644 --- a/bin/templates/cordova/lib/build.js +++ b/bin/templates/cordova/lib/build.js @@ -24,7 +24,6 @@ var shell = require('shelljs'), Q = require('q'), path = require('path'), fs = require('fs'), - which = require('which'), ROOT = path.join(__dirname, '..', '..'); var check_reqs = require('./check_reqs');