Skip to content

Commit

Permalink
feat: update to Kuper 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jahirfiquitiva committed Jan 14, 2024
1 parent ab1462a commit 7571a51
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 14 deletions.
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
-keep class dev.jahir.kuper.** { *; }
-keep class dev.jahir.blueprint.** { *; }

-keep class androidx.core.app.CoreComponentFactory { *; }
-keep class com.google.**
-keep class autovalue.shaded.com.google.**
-keep class com.android.vending.billing.**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@ package dev.jahir.blueprint.app

/* TODO: Remove comment marks to enable
import android.content.Context
import androidx.core.app.NotificationCompat
import com.onesignal.OSNotificationReceivedEvent
import com.onesignal.OneSignal.OSRemoteNotificationReceivedHandler
import dev.jahir.kuper.app.R
import dev.jahir.frames.extensions.context.color
import dev.jahir.frames.extensions.context.drawable
import dev.jahir.frames.extensions.context.preferences
import dev.jahir.frames.extensions.context.hasNotificationsPermission
import dev.jahir.frames.extensions.context.preferences
class NotificationServiceExtension : OSRemoteNotificationReceivedHandler {
override fun remoteNotificationReceived(
context: Context,
notificationReceivedEvent: OSNotificationReceivedEvent
) {
if(!context.preferences.notificationsEnabled || !context.hasNotificationsPermission) {
if (!context.preferences.notificationsEnabled || !context.hasNotificationsPermission) {
notificationReceivedEvent.complete(null)
return
}
val notification = notificationReceivedEvent.notification
val mutableNotification = notification.mutableCopy()
mutableNotification.setExtender { builder: NotificationCompat.Builder ->
builder.color = context.color(R.color.accent)
builder.setSmallIcon(R.drawable.ic_notification)
mutableNotification.setExtender { extender ->
extender.apply {
color = context.color(R.color.accent)
setSmallIcon(R.drawable.ic_notification)
}
}
notificationReceivedEvent.complete(mutableNotification)
}
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/drawable/ic_notification.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="#fff"
android:pathData="M20.6,9.5C20.6,9.5,20.6,9.5,20.6,9.5l0-2c0,0,0,0,0,0V6.1c0-0.7-0.6-1.4-1.4-1.4h-0.5h-1.9h-3.1h-0.7H4.7
C4,4.7,3.4,5.3,3.4,6.1V12L2,18.2c-0.1,0.6,0.3,1.1,0.9,1.1h1.8h1.4h11.9h1.4h1.8c0.6,0,1-0.5,0.9-1.1L20.6,12V9.5z
M16.6,14.1
c-0.7,0.1-1.5,1.5-2.7,0.2c-0.1-0.1-0.1-0.1-0.2-0.2c0,0,0.2,1.6,0.1,1.8c-0.1,0.2-2.5,2-3.2,1.4c-0.1-0.1-0.2-0.2-0.2-0.5
c-0.2-1.7,1.3-4,1.3-4s-2.3,1.4-4,1.3c-0.2,0-0.4-0.1-0.5-0.2c-0.7-0.7,1.1-3,1.4-3.2c0.3-0.2,1.8,0.1,1.8,0.1
c-0.1-0.1-0.1-0.1-0.2-0.2C9,9.4,10.4,8.6,10.5,7.9c0.1-0.7,1-1.4,1-1.4c0.1,0.1,0.2,0.2,0.3,0.3c2.1,2.1,0.7,5.4,0.7,5.4
s3.3-1.4,5.3,0.6c0.1,0.1,0.2,0.2,0.3,0.3C18,13.1,17.4,13.9,16.6,14.1z" />
</vector>
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Blueprint.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

object Blueprint {
const val appId = "dev.jahir.blueprint.app"
const val version = 239
const val versionName = "2.3.9"
const val version = 240
const val versionName = "2.4.0"
}
10 changes: 5 additions & 5 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

object Versions {
// Plugins
const val gradle = "8.1.1"
const val kotlin = "1.9.10"
const val gradle = "8.2.0"
const val kotlin = "1.9.22"
const val sonatype = "1.3.0"
const val ksp = "$kotlin-1.0.13"
const val ksp = "$kotlin-1.0.16"

// OneSignal
const val oneSignal = "4.8.6"
const val oneSignal = "4.8.7"

// App
const val minSdk = 21
const val targetSdk = 34
const val buildTools = "34.0.0"

// Kuper
const val kuper = "2.4.9"
const val kuper = "2.5.0"

// Adaptive Icons
const val adaptiveIcons = "1.0.1"
Expand Down
1 change: 1 addition & 0 deletions library/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
-keep class dev.jahir.kuper.** { *; }
-keep class dev.jahir.blueprint.** { *; }

-keep class androidx.core.app.CoreComponentFactory { *; }
-keep class com.google.**
-keep class autovalue.shaded.com.google.**
-keep class com.android.vending.billing.**
Expand Down

0 comments on commit 7571a51

Please sign in to comment.