Skip to content

Commit

Permalink
Fix local properties file issue
Browse files Browse the repository at this point in the history
  • Loading branch information
creativedrewy committed Oct 16, 2023
1 parent f1d9245 commit 34ed127
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/example-clientlib-ktx-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ android {
}

Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
properties.load(propertiesFile.newDataInputStream())

buildConfigField "String", "HELIUS_KEY", "\"${properties.getProperty("HELIUS_KEY")}\""
buildConfigField "String", "HELIUS_KEY", "\"${properties.getProperty("HELIUS_KEY")}\""
} else {
buildConfigField "String", "HELIUS_KEY", "\"\""
}
}

buildTypes {
Expand Down

0 comments on commit 34ed127

Please sign in to comment.