[ 
https://issues.apache.org/jira/browse/CB-9162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14639755#comment-14639755
 ] 

ASF GitHub Bot commented on CB-9162:
------------------------------------

Github user fujunwei commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/247#discussion_r35388232
  
    --- Diff: 
cordova-lib/spec-plugman/plugins/org.test.defaultvariables/plugin.xml ---
    @@ -0,0 +1,16 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0";
    +    xmlns:android="http://schemas.android.com/apk/res/android";
    +    id="org.test.defaultvariables"
    +    version="3.0.0">
    +
    +    <name>Use Default Variables</name>
    +
    +    <!-- android -->
    +    <platform name="android">
    +            <preference name="ENABLE_LOG" default="yes" />
    +            <preference name="API_KEY" />
    +    </platform>
    --- End diff --
    
    I only found the default `ENABLE_LOG` in `cordova/plugins/android.json`, 
but there is no similar preference `<preference name="ENABLE_LOG" value="yes" 
/>` in config.xml, how to use the Default variable.


> Plugin Variables should support a default value
> -----------------------------------------------
>
>                 Key: CB-9162
>                 URL: https://issues.apache.org/jira/browse/CB-9162
>             Project: Apache Cordova
>          Issue Type: Improvement
>            Reporter: Olivier Goguel
>
> When declaring a variable, it is possible to make it mandatory (by using the 
> <preference> tag), but there's no way to make it optional by defining a 
> default value.
> For example: <preference value="ENABLE_LOG" default="true" />
> This would allow users to keep on customizing specific features of the 
> plugins while not having to worry about all the variables.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to