You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/10/27 22:24:54 UTC

[3/8] git commit: CB-6511 Fixes build for android when app name contains unicode characters.

CB-6511 Fixes build for android when app name contains unicode characters.

github: close #124


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/76044fac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/76044fac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/76044fac

Branch: refs/heads/master
Commit: 76044fac1dff57538f78409bc0062e0513449f8b
Parents: ca84c34
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Sep 23 13:21:17 2014 +0400
Committer: Prabhjot Singh <pr...@amazon.com>
Committed: Mon Oct 20 10:05:09 2014 +0530

----------------------------------------------------------------------
 bin/lib/create.js | 4 +++-
 package.json      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/76044fac/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index a5b524a..3f756ed 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -222,9 +222,11 @@ exports.createProject = function(project_path, package_name, project_name, proje
                            project_template_dir : 
                            path.join(ROOT, 'bin', 'templates', 'project');
 
-    var safe_activity_name = project_name.replace(/\W/g, '');
     var package_as_path = package_name.replace(/\./g, path.sep);
     var activity_dir    = path.join(project_path, 'src', package_as_path);
+    // safe_activity_name is being hardcoded to avoid issues with unicode app name (https://issues.apache.org/jira/browse/CB-6511)
+    // TODO: provide option to specify activity name via CLI (proposal: https://issues.apache.org/jira/browse/CB-7231)
+    var safe_activity_name = 'MainActivity';
     var activity_path   = path.join(activity_dir, safe_activity_name + '.java');
     var target_api      = check_reqs.get_target();
     var manifest_path   = path.join(project_path, 'AndroidManifest.xml');

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/76044fac/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 09f0f7c..942eadf 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
     ],
     "scripts": {
         "test": "jasmine-node --color spec",
-        "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app Test && \"./test create/cordova/build\" && rm -rf \"test create\""
+        "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app 応用 && \"./test create/cordova/build\" && rm -rf \"test create\""
     },
     "author": "Apache Software Foundation",
     "license": "Apache version 2.0",


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