-
Bug
-
Resolution: Fixed
-
P3
-
8
We have several cases where the following, or similar, pattern is used:
defineProperty("COMPILE_WEBKIT", "false")
if (COMPILE_WEBKIT instanceof String) ext.COMPILE_WEBKIT = Boolean.parseBoolean(COMPILE_WEBKIT)
Using the same variable name as first a String property and then a Boolean property (the fact that this is even allowed is one of my pet peeves about scripting languages) in this manner sometimes confuses gradle when you try to override the default setting on the command line. SeeRT-32260 for an example of a real failure that was caused by this problem.
We need to fix this, by leaving the COMPILE_WEBKIT, etc, variables as String properties and defining new Boolean properties that we use in the script for testing. The following are examples of the pattern we should use:
defineProperty("USE_DEPEND", "true")
ext.IS_USE_DEPEND = Boolean.parseBoolean(USE_DEPEND)
defineProperty("JCOV", "false")
ext.DO_JCOV = Boolean.parseBoolean(JCOV)
defineProperty("COMPILE_WEBKIT", "false")
if (COMPILE_WEBKIT instanceof String) ext.COMPILE_WEBKIT = Boolean.parseBoolean(COMPILE_WEBKIT)
Using the same variable name as first a String property and then a Boolean property (the fact that this is even allowed is one of my pet peeves about scripting languages) in this manner sometimes confuses gradle when you try to override the default setting on the command line. See
We need to fix this, by leaving the COMPILE_WEBKIT, etc, variables as String properties and defining new Boolean properties that we use in the script for testing. The following are examples of the pattern we should use:
defineProperty("USE_DEPEND", "true")
ext.IS_USE_DEPEND = Boolean.parseBoolean(USE_DEPEND)
defineProperty("JCOV", "false")
ext.DO_JCOV = Boolean.parseBoolean(JCOV)
- relates to
-
JDK-8096587 Gradle: USE_DEPEND doesn't apply on tests
-
- Closed
-