ASF GitHub Bot commented on CB-14201:

erisu commented on issue #465: CB-14201: (android) Removes Gradle property 
in-line command arguments…
URL: https://github.com/apache/cordova-android/pull/465#issuecomment-404177315
   Yes, The hardcoded defaults were removed so they can now be overridden by 
the user from the `gradle.properties`.  
   **Additional Note:** Overridden defaults are accepted, not reverted, but the 
user will see an info message emitted with the Cordova's recommended value.
   Yes, the old defaults are used for creating the file. Since the first step 
for a new project is `cordova platform add`, it will naturally run `prepare` 
right after. This will create the new `gradle.properties` file with the 
original defaults and values that were previously hard-coded.
   The parser can read other non-default properties but is only used for the 
original defaults.
   As for supplying a lot of other configs, it was already possible by creating 
this file manually since  Gradle naturally detects and uses the properties 
file. This PR main goal was removing the three hardcoded command-line arguments 
so it won't be locked in.
   __Here are also some additional use cases:__
   **Use Case 1:** For existing projects that are missing the 
`gradle.properties` file, it will be created during the `prepare` step. Either 
triggered by `cordova (prepare|run|build)`.
   **Use Case 2:** Existing projects with existing  `gradle.properties` file 
will check and add missing defaults. 
   __And lastly, possible drawbacks, but not serious:__
   **1.** If the user deletes a default, it will be re-appended. In this case, 
the user would just need to negate its value or take the default value listed 
by Gradle's docs if they don't want it or modify it.
   **2.** (Possibly a Very Small Edge Case) For existing projects, with no 
`gradle.properties` file, if only running `cordova compile` without preparing, 
builds will not run with any defaults. During local testing, with no 
`gradle.properties` file builds continue to build successfully.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Remove Gradle property in-line command arguments for gradle.properties
> ----------------------------------------------------------------------
>                 Key: CB-14201
>                 URL: https://issues.apache.org/jira/browse/CB-14201
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-android
>            Reporter: Bryan Ellis
>            Priority: Minor
> By passing in properties as an argument to the Gradle's command, it prevents 
> users from being able to override these values. 
> In one example, a user reported 
> ([CB-14139|https://issues.apache.org/jira/browse/CB-14139]) the need to be 
> able to set the jvmargs so builds works on 32bit Java.
> Some other values Cordova passes by default are org.gradle.daemon and 
> android.useDeprecatedNdk.
> By removing the command line argument usage and migrating to the usage of 
> gradle.properties, it gives users the flexibility to override defaults if 
> desired.  
> This ticket will also resolve 
> [CB-14139|https://issues.apache.org/jira/browse/CB-14139] but also remove the 
> other argument usage.

This message was sent by Atlassian JIRA

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

Reply via email to