Skip to content

Commit 9c19a80

Browse files
committed
chore: make configField optional
1 parent 7e0652c commit 9c19a80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ android {
9898
dimension "pro"
9999

100100
File file = rootProject.file("local.properties")
101+
String keyName = "REVENUECAT_API_KEY"
101102

102103
if (file.exists()) {
103104
def localProperties = new Properties()
104105
localProperties.load(new FileInputStream(file))
105-
buildConfigField("String", "REVENUECAT_API_KEY", localProperties["REVENUECAT_API_KEY"])
106+
if (localProperties.hasProperty(keyName)) {
107+
buildConfigField("String", keyName, localProperties[keyName])
108+
}
106109
}
107110
}
108111
}

0 commit comments

Comments
 (0)