CB-14139 android: Add jvmargs flag for custom values#459
CB-14139 android: Add jvmargs flag for custom values#459erisu wants to merge 1 commit intoapache:masterfrom
Conversation
|
Couldn't we instead remove the default jvmargs setting and use one of the various other transparent methods of setting this? As in environment variables (per command) or Gradle properties. I'm just asking. New features are hard to get rid of, once added. |
|
I do not mind if the Gradle's Documentation also references the usage of The only potential issue is for users that have already created their own If the Gradle's default maximum heap size is The |
|
Thanks for your Analysis. Looking at the issue this is supposed to fix, I wonder if removing the default memory setting is the right thing here. The way I see it, we would be improving support for 32 bit JVMs while worsening the situation for large projects. That does not sound like a good deal to me. Is 32bit Java support even relevant? If so, IMHO the best thing would be detecting it and limit the heap size accordingly. However, we probably need the check_reqs cleanup that I put on the roadmap for next major first. Does that make sense or am I getting something wrong? I would definitely like a third opinion on this. Edit: Closed by accident. Sorry |
Codecov Report
@@ Coverage Diff @@
## master #459 +/- ##
========================================
- Coverage 52.03% 52% -0.04%
========================================
Files 17 17
Lines 1695 1696 +1
Branches 312 313 +1
========================================
Hits 882 882
- Misses 813 814 +1
Continue to review full report at Codecov.
|
|
Huh @erisu? What happened? |
|
@janpio, sorry for the missing comment. The more I think about it, it's probably better to not add an additional flag to set the jvmargs. It is a quicker and simpler solution but as mentioned, it would be harder to remove the flag in the future. Using the gradle.properties would be better in the long run. Looking back at the potential issue mentioned above when using the properties file, I think we just need to create a GradlePropertiesConfigParser/Writer. If the file doesn't exist, we can either
If the file already exists, parse the file to see if they have the default variables (excluding its value). If the default arguments are missing:
If they already have the arguments define, then just accept their values. Also, I feel the amount of 32bit users could probably be very low and this would be an edge case. Since the user had a temporary workaround, we might be able to focus on removing all of the command-line usage in-favor of the gradle.properties instead of just jvmargs. The user's temporary workaround did mention setting the environment variables affect the whole system but, it might be possible to set the variable during execution. This shouldn't affect the whole system. |
Platforms affected
Android
What does this PR do?
Added an additional flag
--jvmargsto allow users to customize the Gradle's JVM memory heap size settings.Document updates have been submitted in cordova-docs PR 839.
JIRA Ticket: CB-14139
What testing has been done on this change?
Checklist