Skip to content

Commit

Permalink
Fix F-Droid build
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrivoruchko committed Jan 11, 2024
1 parent b532f81 commit f9f8f74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension> {
mappingFileUploadEnabled = false
Expand Down Expand Up @@ -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
}
6 changes: 5 additions & 1 deletion webrtc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f9f8f74

Please sign in to comment.