Close the local.properties file after reading

This commit is contained in:
Nagesh Susarla
2017-07-31 15:36:18 -07:00
parent 69b4d213b7
commit b9788bbafd
@@ -29,7 +29,9 @@ fun mapKotlinTaskProperties(project: Project, task: AbstractKotlinCompile<*>) {
val localPropertiesFile = project.rootProject.file("local.properties")
if (localPropertiesFile.isFile) {
val properties = Properties()
properties.load(localPropertiesFile.inputStream())
localPropertiesFile.inputStream().use {
properties.load(it)
}
propertyMappings.forEach { it.apply(properties, task) }
}
}