Skip to content

Commit f9f8f74

Browse files
committedJan 11, 2024
Fix F-Droid build
1 parent b532f81 commit f9f8f74

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed
 

‎app/build.gradle.kts

+7-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ android {
4848
viewBinding = true
4949
}
5050

51-
val localProps = Properties().apply { file("../local.properties").inputStream().use { load(it) } }
51+
val localProps = Properties()
52+
val localProperties = File(rootProject.rootDir, "local.properties")
53+
if (localProperties.exists() && localProperties.isFile) {
54+
localProperties.inputStream().use { localProps.load(it) }
55+
}
5256

5357
buildTypes {
5458
debug {
@@ -72,7 +76,7 @@ android {
7276
buildConfigField("String", "AD_UNIT_ID_B", localProps.getProperty("ad.unitIdB", ""))
7377
buildConfigField("String", "AD_UNIT_ID_C", localProps.getProperty("ad.unitIdC", ""))
7478
}
75-
create("firebaseFree") {
79+
create("firebasefree") {
7680
manifestPlaceholders += mapOf("adMobPubId" to "")
7781
configure<com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension> {
7882
mappingFileUploadEnabled = false
@@ -126,5 +130,5 @@ dependencies {
126130

127131
project.tasks.configureEach {
128132
if (name.startsWith("injectCrashlyticsMappingFileIdFirebaseFree")) enabled = false
129-
if (name.startsWith("processFirebaseFree") && name.endsWith("GoogleServices")) enabled = false
133+
if (name.startsWith("processFirebasefree") && name.endsWith("GoogleServices")) enabled = false
130134
}

‎webrtc/build.gradle.kts

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ android {
2323
viewBinding = true
2424
}
2525

26-
val localProps = Properties().apply { file("../local.properties").inputStream().use { load(it) } }
26+
val localProps = Properties()
27+
val localProperties = File(rootProject.rootDir, "local.properties")
28+
if (localProperties.exists() && localProperties.isFile) {
29+
localProperties.inputStream().use { localProps.load(it) }
30+
}
2731

2832
buildTypes {
2933
debug {

0 commit comments

Comments
 (0)
Failed to load comments.