cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject android commit: CB-8884 Delete Eclipse tweaks from create script
Date Tue, 21 Apr 2015 18:24:35 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master b63a2e37b -> ee14a6779


CB-8884 Delete Eclipse tweaks from create script


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/ee14a677
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/ee14a677
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/ee14a677

Branch: refs/heads/master
Commit: ee14a67795b446bce76ac39a64b6c36cc4b96597
Parents: b63a2e3
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Apr 21 14:24:15 2015 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Apr 21 14:24:15 2015 -0400

----------------------------------------------------------------------
 bin/lib/create.js                         | 21 +-------
 bin/templates/project/eclipse-project     | 45 ----------------
 bin/templates/project/eclipse-project-CLI | 71 --------------------------
 3 files changed, 1 insertion(+), 136 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/ee14a677/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index a816d35..c7f5656 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -58,7 +58,7 @@ function copyJsAndLibrary(projectPath, shared, projectName) {
         if (shared) {
             shell.rm('-rf', nestedCordovaLibPath);
         } else if (!wasSymlink) {
-            // Delete only the src, since eclipse can't handle its .project file being deleted.
+            // Delete only the src, since Eclipse / Android Studio can't handle their project
files being deleted.
             shell.rm('-rf', path.join(nestedCordovaLibPath, 'src'));
         }
     });
@@ -72,13 +72,6 @@ function copyJsAndLibrary(projectPath, shared, projectName) {
         shell.cp('-f', path.join(ROOT, 'framework', 'build.gradle'), nestedCordovaLibPath);
         shell.cp('-f', path.join(ROOT, 'framework', 'cordova.gradle'), nestedCordovaLibPath);
         shell.cp('-r', path.join(ROOT, 'framework', 'src'), nestedCordovaLibPath);
-        // Create an eclipse project file and set the name of it to something unique.
-        // Without this, you can't import multiple CordovaLib projects into the same workspace.
-        var eclipseProjectFilePath = path.join(nestedCordovaLibPath, '.project');
-        if (!fs.existsSync(eclipseProjectFilePath)) {
-            var data = '<?xml version="1.0" encoding="UTF-8"?><projectDescription><name>'
+ projectName + '-' + 'CordovaLib</name></projectDescription>';
-            fs.writeFileSync(eclipseProjectFilePath, data, 'utf8');
-        }
     }
 }
 
@@ -248,17 +241,6 @@ exports.createProject = function(project_path, package_name, project_name,
activ
             // 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) {
-                var note = 'To show `assets/www` or `res/xml/config.xml`, go to:\n' +
-                           '    Project -> Properties -> Resource -> Resource Filters\n'
+
-                           'And delete the exclusion filter.\n';
-                shell.cp(path.join(project_template_dir, 'eclipse-project-CLI'), path.join(project_path,
'.project'));
-                fs.writeFileSync(path.join(project_path, 'assets', '_where-is-www.txt'),
note);
-            } else {
-                shell.cp(path.join(project_template_dir, 'eclipse-project'), path.join(project_path,
'.project'));
-            }
-
             // copy cordova.js, cordova.jar
             copyJsAndLibrary(project_path, use_shared_project, safe_activity_name);
 
@@ -267,7 +249,6 @@ exports.createProject = function(project_path, package_name, project_name,
activ
             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-android/blob/ee14a677/bin/templates/project/eclipse-project
----------------------------------------------------------------------
diff --git a/bin/templates/project/eclipse-project b/bin/templates/project/eclipse-project
deleted file mode 100644
index 42bcc3e..0000000
--- a/bin/templates/project/eclipse-project
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>__NAME__</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-	<filteredResources>
-		<filter>
-			<id>1388696068187</id>
-			<name></name>
-			<type>10</type>
-			<matcher>
-				<id>org.eclipse.ui.ide.multiFilter</id>
-				<arguments>1.0-name-matches-false-true-CordovaLib|platform_www|cordova</arguments>
-			</matcher>
-		</filter>
-	</filteredResources>
-</projectDescription>
-

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/ee14a677/bin/templates/project/eclipse-project-CLI
----------------------------------------------------------------------
diff --git a/bin/templates/project/eclipse-project-CLI b/bin/templates/project/eclipse-project-CLI
deleted file mode 100644
index 581b3ab..0000000
--- a/bin/templates/project/eclipse-project-CLI
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>__NAME__</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-	<linkedResources>
-		<link>
-                        <name>config.xml</name>
-			<type>1</type>
-			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/config.xml</locationURI>
-		</link>
-                <link>
-                        <name>www</name>
-                        <type>2</type>
-			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/www</locationURI>
-                </link>
-                <link>
-                        <name>merges</name>
-                        <type>2</type>
-			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/merges</locationURI>
-                </link>
-	</linkedResources>
-        <filteredResources>
-                <filter>
-                        <id>1390880034107</id>
-                        <name></name>
-                        <type>30</type>
-                        <matcher>
-                                <id>org.eclipse.ui.ide.multiFilter</id>
-                                <arguments>1.0-projectRelativePath-matches-false-true-^(build.xml|ant-gen|ant-build|custom_rules.xml|CordovaLib|platform_www|cordova)</arguments>
-                        </matcher>
-                </filter>
-                <filter>
-                        <id>1390880034108</id>
-                        <name></name>
-                        <type>30</type>
-                        <matcher>
-                                <id>org.eclipse.ui.ide.multiFilter</id>
-                                <arguments>1.0-projectRelativePath-matches-false-true-^(assets/www|res/xml/config.xml)</arguments>
-                        </matcher>
-                </filter>
-        </filteredResources>
-</projectDescription>
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message