cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kotikov (Akvelon)" <v-vlk...@microsoft.com>
Subject RE: New project <PATH> vs. <NAME>
Date Fri, 12 Sep 2014 18:59:06 GMT
Bumping this again. 

Can anyone pls. review following PRs:
    https://github.com/apache/cordova-cli/pull/192
    https://github.com/apache/cordova-lib/pull/84
    https://github.com/apache/cordova-android/pull/118

This is an implementation for CB-7231 “Provide more control over CordovaProjectName vs CordovaAppName”
[1]
These changes adds a new option for cli and Android tooling  - --projectname that allow to
user to specify main class name, different from application name. This is necessary when application
name contains non-ASCII characters since ADK tools can't properly handle this situation.

Implementation is for Android only, since we don't see any problems with other platforms.

I think we need to decide should it be a core option that can be defined via CLI command or
in config.xml or just an android optio/preference.
And if it is a core, do we need it for all platforms, or for android only?

-------------
Best regards, Vladimir


-----Original Message-----
From: Vladimir Kotikov (Akvelon) [mailto:v-vlkoti@microsoft.com] 
Sent: Friday, September 5, 2014 5:24 PM
To: dev@cordova.apache.org
Subject: RE: New project <PATH> vs. <NAME>

Hi all!

I’ve started working on implementation for CB-7231 “Provide more control over CordovaProjectName
vs CordovaAppName” [1].

Draft implementation for android is ready, you can review it here:
    https://github.com/apache/cordova-cli/pull/192
    https://github.com/apache/cordova-lib/pull/84
    https://github.com/apache/cordova-android/pull/118

1.General changes in cli/lib
  * ProjectName can be specified via --projectname option for cli create command;
  * It's written to config.xml into <projectname> element.
    Another option - store Project name into <name> element's attribute - <name projectname="ProjName">AppName<name>

2. Android part of implementation:
  * ProjectName can be specified for bin/create script via --projectname option;
  * If specified, used for main activity/class name replacement;

3. Android_parser in cli
  * update_from_config() method handles <projectname>  element in config.xml during
prepare step and renames main class and changes activity name in manifest according to <projectname>
value.
  * in case of <projectname> element removal main class and activity name are remains
unchanged from last rename. 

For discussion:
1. Currently I use <projectname> element to store ProjectName at config.xml? Another
possible option - use <name projectname=""> approach, like Carlos proposed.
2. Currently if ProjectName becomes undefined (<projectname> element is removed) main
class file and activity are not being renamed back to app name.

Thoughts?

And just a PS. Could anyone pls. give me permissions at JIRA so I can assign issues to myself?

[1] https://issues.apache.org/jira/browse/CB-7231 

---------------
Best regards, Vladimir
Mime
View raw message