From 50914aaeb41b5369d8636df191eb2d3211fbaaf7 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Sat, 10 Sep 2022 15:35:48 +0100 Subject: [PATCH] fixing firebase classes being imported for foss variant - the notification module was pulling in firebase for an annotation import, which in turn pulled in the .aar manifest entries and services etc, fixed by removing the unneeded dependency --- features/notifications/build.gradle | 2 -- .../app/dapk/st/notifications/AndroidNotificationStyle.kt | 3 --- .../dapk/st/notifications/AndroidNotificationStyleBuilder.kt | 3 --- 3 files changed, 8 deletions(-) diff --git a/features/notifications/build.gradle b/features/notifications/build.gradle index 377a496..85ca262 100644 --- a/features/notifications/build.gradle +++ b/features/notifications/build.gradle @@ -12,8 +12,6 @@ dependencies { implementation project(":features:messenger") implementation project(":features:navigator") - implementation platform('com.google.firebase:firebase-bom:29.0.3') - implementation 'com.google.firebase:firebase-messaging' implementation Dependencies.mavenCentral.kotlinSerializationJson kotlinTest(it) diff --git a/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyle.kt b/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyle.kt index 05dd95e..d163192 100644 --- a/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyle.kt +++ b/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyle.kt @@ -2,8 +2,6 @@ package app.dapk.st.notifications import android.app.Notification import android.graphics.drawable.Icon -import android.os.Build -import androidx.annotation.RequiresApi sealed interface AndroidNotificationStyle { @@ -20,7 +18,6 @@ sealed interface AndroidNotificationStyle { val content: List, ) : AndroidNotificationStyle { - @RequiresApi(Build.VERSION_CODES.P) override fun build(builder: AndroidNotificationStyleBuilder) = builder.build(this) data class AndroidPerson(val name: String, val key: String, val icon: Icon? = null) diff --git a/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyleBuilder.kt b/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyleBuilder.kt index ec91fba..898d0a9 100644 --- a/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyleBuilder.kt +++ b/features/notifications/src/main/kotlin/app/dapk/st/notifications/AndroidNotificationStyleBuilder.kt @@ -5,8 +5,6 @@ import android.app.Notification import android.app.Notification.InboxStyle import android.app.Notification.MessagingStyle import android.app.Person -import android.os.Build -import androidx.annotation.RequiresApi @SuppressLint("NewApi") class AndroidNotificationStyleBuilder( @@ -27,7 +25,6 @@ class AndroidNotificationStyleBuilder( inboxStyle.setSummaryText(summary) } - @RequiresApi(Build.VERSION_CODES.P) private fun AndroidNotificationStyle.Messaging.buildMessagingStyle() = messagingStyleFactory( personBuilderFactory() .setName(person.name)