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

Reply via email to