Skip to content

Commit

Permalink
Parse system-properties as a config object to avoid extraneous quot…
Browse files Browse the repository at this point in the history
…es around keys
  • Loading branch information
bamboo committed Apr 1, 2020
1 parent 667f401 commit d1e7681
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/gradle/profiler/ConfigUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ConfigUtil {
public static Map<String, String> map(Config config, String key, Map<String, String> defaultValues) {
if (config.hasPath(key)) {
Map<String, String> props = new LinkedHashMap<>();
for (Map.Entry<String, ConfigValue> entry : config.getConfig(key).entrySet()) {
for (Map.Entry<String, ConfigValue> entry : config.getObject(key).entrySet()) {
props.put(entry.getKey(), entry.getValue().unwrapped().toString());
}
return props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,14 +777,14 @@ a {
versions = "$minimalSupportedGradleVersion"
tasks = assemble
system-properties {
org.gradle.test = "value-1"
"org.gradle.test" = "value-1"
}
}
b {
versions = "$minimalSupportedGradleVersion"
tasks = assemble
system-properties {
org.gradle.test = "value-2"
"org.gradle.test" = "value-2"
}
}
"""
Expand Down
4 changes: 2 additions & 2 deletions src/test/groovy/org/gradle/profiler/ScenarioLoaderTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class ScenarioLoaderTest extends Specification {
expect:
def instantExecution = scenarios[0] as GradleScenarioDefinition
instantExecution.systemProperties == [
'"org.gradle.unsafe.instant-execution"': "true",
'"org.gradle.unsafe.instant-execution.fail-on-problems"': "false"
"org.gradle.unsafe.instant-execution": "true",
"org.gradle.unsafe.instant-execution.fail-on-problems": "false"
]
}

Expand Down

0 comments on commit d1e7681

Please sign in to comment.