This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From my Codeberg page: https://codeberg.org/FlyingDutchman/GradleReadProperty/src/branch/main/getSetting | |
// Simply copy following code in your gradle.build.kts file | |
// Also use the following imports: java.io.File and import java.util.* | |
fun getSetting(key: String) = project.getSetting(key) | |
fun Project.getSetting(key: String): String { | |
// Check if local properties | |
val localProperty = rootProject.file("local.properties") | |
if (localProperty.isFile) { |