cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-11023) plugin.xml should be able to add attribute to an existing element in AndroidManifest.xml
Date Thu, 19 May 2016 22:17:12 GMT


ASF GitHub Bot commented on CB-11023:

Github user riknoll commented on the pull request:
    I think that the issue might be that we need to separate inserting child elements and
editing existing ones. Something like this:
    <!-- Editing attributes in existing elements -->
    <edit-config target="xpath/nonsense" mode="merge|overwrite">
        <attribute name="attr" new-value="edited" />
    <!-- Existing config-file insert behavior -->
    <insert-config parent="xpath/nonsense">
        <child-element />
    This is a bit more verbose if you have a lot of edits that need to be performed, but much
more flexible because the xpath selector can be used to reference specific elements, even
in lists. It might also help with detecting plugin conflicts. I don't care about the names
of those tags (we can keep using config-file if we want).
    For plugin conflicts, detection should probably happen at "plugin add" time. The add should
fail on conflict and allow the user to override it using `--force` if they want to. As for
which plugin gets dibs in the forced add scenario, it doesn't really matter as long as it
is consistent. Hopefully the user can determine the correct value on conflict and fix it by
editing the config from the project's `config.xml`. 

> plugin.xml should be able to add attribute to an existing element in AndroidManifest.xml
> ----------------------------------------------------------------------------------------
>                 Key: CB-11023
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message