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
This commit is contained in:
Ian Clelland 2014-08-20 11:17:04 -04:00
parent b2776269cf
commit 7caa96abcd
2 changed files with 0 additions and 19 deletions

View File

@ -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'));

View File

@ -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');