cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktop <>
Subject [GitHub] cordova-lib pull request #449: CB-11023 Add edit-config functionality
Date Fri, 03 Jun 2016 20:42:21 GMT
GitHub user ktop opened a pull request:

    CB-11023 Add edit-config functionality

    New edit-config tag for plugin.xml will allow users to modify xml attributes. 
    Ex. Assumes your AndroidManifest.xml has a second activity element with attribute android:name="SecondActivity"
    <!-- Will modify first activity -->
    <edit-config file="AndroidManifest.xml" target="/manifest/application/activity" mode="merge">
                <activity android:enabled="true" android:configChanges="orientation|keyboardHidden"
    <!-- Will modify second activity -->
    <edit-config file="AndroidManifest.xml" target="/manifest/application/activity[@android:name='SecondActivity']"
                <activity android:enabled="true" android:name="SecondActivity" />
    file: specifies the file location
    target: specifies an xpath to the element that you want to modify
    - merge: add attributes in the target with the ones specified by edit-config and will
replace if the attribute names are the same
    - overwrite: replace all of the attributes at the target with the one specified by edit-config
    children: will only modify one element per edit-config tag
    There is conflict checking now....if a plugin wants to modify an attribute another plugin
has already modified, an error will be thrown and plugin install will fail. The user must
fix the conflict or they can use --force to force add the plugin and overwrite the conflict.

    Lastly, on plugin uninstall, the plugin should restore the attributes to the state it
was before installing. 

You can merge this pull request into a Git repository by running:

    $ git pull editconfig

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #449
commit a3864929400f61fc31d03c3bab1d91a9467a3fbf
Author: unknown <>
Date:   2016-05-26T21:36:23Z

    CB-11023 Add edit-config functionality


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

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

View raw message