Hey guys would appreciate any pointers in the righ...
# android
i
Hey guys would appreciate any pointers in the right direction. I'm migrating an Android gradle build script to Kotlin. I extract a build time property from 
local.properties
 using groovy.
Copy code
def properties = new Properties()
properties.load(properties.rootProject.file("local.properties).newDataInputStream()
def key = properties.getProperties("google.map.key")
Does anyone know how to replace it with the 
gradleLocalProperties
 DSL or any documentation on this?
Copy code
import java.utils.Properties
import java.io.FileInputStream

val properties = Properties()
properties.load(FileInputStream(project.rootProject.file("loal.properties")))
val key = properties["goole.map.key"] as String
Managed to find a solution 🙂
g
Copy code
properties.load(project.rootProject.file("loal.properties").inputStream())
👍 1
i
Thanks! A more elegant solution 🙂