Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E45D210A59 for ; Wed, 22 Jan 2014 19:38:51 +0000 (UTC) Received: (qmail 10112 invoked by uid 500); 22 Jan 2014 19:38:41 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 9875 invoked by uid 500); 22 Jan 2014 19:38:29 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 9124 invoked by uid 99); 22 Jan 2014 19:38:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 19:38:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B3A288A0730; Wed, 22 Jan 2014 19:38:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bowserj@apache.org To: commits@cordova.apache.org Date: Wed, 22 Jan 2014 19:38:58 -0000 Message-Id: In-Reply-To: <35ee4e824f4749d38a571ff5143c46dd@git.apache.org> References: <35ee4e824f4749d38a571ff5143c46dd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [47/50] [abbrv] git commit: CB-5715 Add Eclipse .project file to create template. CB-5715 Add Eclipse .project file to create template. Adds resource filter to hide CordovaLib/, platform_www/, and cordova/. Adds linked resources to root www/, merges/, config.xml Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/70ce1117 Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/70ce1117 Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/70ce1117 Branch: refs/heads/master Commit: 70ce111759f7bb0d692772809a0c5c4d2cc5ca3f Parents: 4963927 Author: Andrew Grieve Authored: Thu Jan 2 16:40:48 2014 -0500 Committer: Joe Bowser Committed: Wed Jan 22 11:37:23 2014 -0800 ---------------------------------------------------------------------- bin/create | 1 + bin/lib/create.js | 9 +++- bin/templates/project/eclipse-project | 45 +++++++++++++++++ bin/templates/project/eclipse-project-CLI | 67 ++++++++++++++++++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/create ---------------------------------------------------------------------- diff --git a/bin/create b/bin/create index 9ab6689..455ba30 100755 --- a/bin/create +++ b/bin/create @@ -37,3 +37,4 @@ if(args.length < 3 || (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' }); } +create.createProject(args._[0], args._[1], args._[2], args._[3], args['--shared'], args['--cli']).done(); http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/lib/create.js ---------------------------------------------------------------------- diff --git a/bin/lib/create.js b/bin/lib/create.js index c482b5a..c542ab8 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -105,7 +105,7 @@ function copyScripts(projectPath) { * Returns a promise. */ -exports.createProject = function(project_path, package_name, project_name, project_template_dir) { +exports.createProject = function(project_path, package_name, project_name, project_template_dir, use_shared_project, use_cli_template) { var VERSION = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim(); // Set default values for path, package and name @@ -154,6 +154,12 @@ exports.createProject = function(project_path, package_name, project_name, proje shell.cp('-r', path.join(project_template_dir, 'res'), project_path); // Manually create directories that would be empty within the template (since git doesn't track directories). shell.mkdir(path.join(project_path, 'libs')); + // Add in the proper eclipse project file. + if (use_cli_template) { + shell.cp(path.join(project_template_dir, 'eclipse-project-CLI'), path.join(project_path, '.project')); + } else { + shell.cp(path.join(project_template_dir, 'eclipse-project'), path.join(project_path, '.project')); + } // copy cordova.js, cordova.jar and res/xml shell.cp('-r', path.join(ROOT, 'framework', 'res', 'xml'), path.join(project_path, 'res')); @@ -164,6 +170,7 @@ exports.createProject = function(project_path, package_name, project_name, proje shell.cp('-f', path.join(project_template_dir, 'Activity.java'), activity_path); shell.sed('-i', /__ACTIVITY__/, safe_activity_name, activity_path); shell.sed('-i', /__NAME__/, project_name, path.join(project_path, 'res', 'values', 'strings.xml')); + shell.sed('-i', /__NAME__/, project_name, path.join(project_path, '.project')); shell.sed('-i', /__ID__/, package_name, activity_path); shell.cp('-f', path.join(project_template_dir, 'AndroidManifest.xml'), manifest_path); http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/templates/project/eclipse-project ---------------------------------------------------------------------- diff --git a/bin/templates/project/eclipse-project b/bin/templates/project/eclipse-project new file mode 100644 index 0000000..42bcc3e --- /dev/null +++ b/bin/templates/project/eclipse-project @@ -0,0 +1,45 @@ + + + __NAME__ + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + + + 1388696068187 + + 10 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-true-CordovaLib|platform_www|cordova + + + + + http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/templates/project/eclipse-project-CLI ---------------------------------------------------------------------- diff --git a/bin/templates/project/eclipse-project-CLI b/bin/templates/project/eclipse-project-CLI new file mode 100644 index 0000000..5772dec --- /dev/null +++ b/bin/templates/project/eclipse-project-CLI @@ -0,0 +1,67 @@ + + + __NAME__ + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + + + ** Cordova Project ** + 2 + virtual:/virtual + + + ** Cordova Project **/config.xml + 1 + $%7BPARENT-2-PROJECT_LOC%7D/www/config.xml + + + ** Cordova Project **/www + 2 + $%7BPARENT-2-PROJECT_LOC%7D/www + + + ** Cordova Project **/merges + 2 + $%7BPARENT-2-PROJECT_LOC%7D/merges + + + + + 1388696068187 + + 10 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-true-CordovaLib|platform_www|cordova + + + + +