From f9f8f748615fde83716ac4eefde6a500211be940 Mon Sep 17 00:00:00 2001 From: Dmytro Kryvoruchko Date: Thu, 11 Jan 2024 09:33:27 +0200 Subject: [PATCH] Fix F-Droid build --- app/build.gradle.kts | 10 +++++++--- webrtc/build.gradle.kts | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index afcc69a1..a7805756 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -48,7 +48,11 @@ android { viewBinding = true } - val localProps = Properties().apply { file("../local.properties").inputStream().use { load(it) } } + val localProps = Properties() + val localProperties = File(rootProject.rootDir, "local.properties") + if (localProperties.exists() && localProperties.isFile) { + localProperties.inputStream().use { localProps.load(it) } + } buildTypes { debug { @@ -72,7 +76,7 @@ android { buildConfigField("String", "AD_UNIT_ID_B", localProps.getProperty("ad.unitIdB", "")) buildConfigField("String", "AD_UNIT_ID_C", localProps.getProperty("ad.unitIdC", "")) } - create("firebaseFree") { + create("firebasefree") { manifestPlaceholders += mapOf("adMobPubId" to "") configure { mappingFileUploadEnabled = false @@ -126,5 +130,5 @@ dependencies { project.tasks.configureEach { if (name.startsWith("injectCrashlyticsMappingFileIdFirebaseFree")) enabled = false - if (name.startsWith("processFirebaseFree") && name.endsWith("GoogleServices")) enabled = false + if (name.startsWith("processFirebasefree") && name.endsWith("GoogleServices")) enabled = false } \ No newline at end of file diff --git a/webrtc/build.gradle.kts b/webrtc/build.gradle.kts index ab10abe9..74de87d5 100644 --- a/webrtc/build.gradle.kts +++ b/webrtc/build.gradle.kts @@ -23,7 +23,11 @@ android { viewBinding = true } - val localProps = Properties().apply { file("../local.properties").inputStream().use { load(it) } } + val localProps = Properties() + val localProperties = File(rootProject.rootDir, "local.properties") + if (localProperties.exists() && localProperties.isFile) { + localProperties.inputStream().use { localProps.load(it) } + } buildTypes { debug {