[
https://issues.apache.org/jira/browse/CB-11023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15322936#comment-15322936
]
ASF GitHub Bot commented on CB-11023:
-------------------------------------
Github user riknoll commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/449#discussion_r66486389
--- Diff: cordova-common/src/ConfigChanges/ConfigChanges.js ---
@@ -125,12 +128,32 @@ function remove_plugin_changes(pluginInfo,
is_top_level) {
PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
-function add_plugin_changes(pluginInfo, plugin_vars, is_top_level,
should_increment) {
+function add_plugin_changes(pluginInfo, plugin_vars, is_top_level,
should_increment, plugin_force) {
var self = this;
var platform_config = self.platformJson.root;
+ var editConfigChanges = pluginInfo.getEditConfigs(self.platform);
+ var config_munge;
- // get config munge, aka how should this plugin change various config
files
- var config_munge = self.generate_plugin_config_munge(pluginInfo,
plugin_vars);
+ if (!editConfigChanges || editConfigChanges.length === 0) {
+ // get config munge, aka how should this plugin change various
config files
+ config_munge = self.generate_plugin_config_munge(pluginInfo,
plugin_vars);
+ }
+ else if (plugin_force) {
+ CordovaLogger.get().log(CordovaLogger.WARN, '--force is used.
edit-config will overwrite any conflicts');
--- End diff --
I would add "conflicting plugins may not work as expected" to the end of
this warning (or something to that effect)
> plugin.xml should be able to add attribute to an existing element in
> AndroidManifest.xml
> ----------------------------------------------------------------------------------------
>
> Key: CB-11023
> URL: https://issues.apache.org/jira/browse/CB-11023
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CLI, Plugman
> Reporter: Carlos Santana
>
> We have a need for a plugin we develop to add the attribute android:name to
> the <application> element to be able to point to a Class that tracks app
> sessions for analytics.
> plugin.xml only support via <config-file> only to add elements to
> AndroidManfist.xml this request is to add an enhancement to also handle
> adding an attribute to an existing element.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]