summaryrefslogtreecommitdiff
path: root/build/scripts/utils.gant
diff options
context:
space:
mode:
Diffstat (limited to 'build/scripts/utils.gant')
-rw-r--r--build/scripts/utils.gant9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/scripts/utils.gant b/build/scripts/utils.gant
index 580d63d0bb53..e5eb3eb90c25 100644
--- a/build/scripts/utils.gant
+++ b/build/scripts/utils.gant
@@ -89,7 +89,7 @@ private String require(String key) {
this[key]
}
catch (MissingPropertyException ignored) {
- projectBuilder.error("Property $key is required")
+ projectBuilder.error("Property '$key' is required")
}
}
@@ -98,7 +98,7 @@ private String require(String key, String defaultValue) {
this[key]
}
catch (MissingPropertyException ignored) {
- projectBuilder.info("$key is not defined. Defaulting to $defaultValue")
+ projectBuilder.info("'$key' is not defined. Defaulting to '$defaultValue'")
this[key] = defaultValue
}
}
@@ -113,8 +113,9 @@ binding.setVariable("requireProperty", {String key, String defaultValue = null -
})
binding.setVariable("guessHome", {
- // Current file is supposed to be at build/scripts/release.gant path
- new File(requireProperty("gant.file").substring("file:".length())).getParentFile().getParentFile().getParent()
+ // current file is supposed to be at build/scripts/*.gant path
+ String uri = requireProperty("gant.file")
+ new File(new URI(uri).getSchemeSpecificPart()).getParentFile().getParentFile().getParent()
})
binding.setVariable("loadProject", {