From a6bba06a2df41b38387875a3f04dd2fdd54dbc2a Mon Sep 17 00:00:00 2001 From: Robert Oles Date: Tue, 24 Sep 2024 08:02:33 +0100 Subject: [PATCH] release 1.10.0 --- CHANGELOG.md | 5 +++++ README.md | 19 +------------------ pushnotifications/build.gradle | 7 ++++--- pushnotifications/gradle.properties | 2 +- .../internal/DeviceStateStoreTest.kt | 6 +++--- .../internal/InstanceDeviceStateStoreTest.kt | 13 +++++++------ 6 files changed, 21 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c29144..aa643b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.10.0] - 2024-09-24 + +### Changed +- Removed firebase-installations dependency in favour of firebase-messaging + ## [1.9.2] - 2023-02-22 ### Changed diff --git a/README.md b/README.md index edff7df..34b60ba 100644 --- a/README.md +++ b/README.md @@ -26,30 +26,13 @@ buildscript { ### Update your app level gradle config -If using firebase-messaging version below 22.0.0: -``` -dependencies { - ... - - // Add these lines - implementation 'com.google.firebase:firebase-core:16.0.9' - implementation 'com.google.firebase:firebase-messaging:18.0.0' - implementation 'com.pusher:push-notifications-android:1.9.2' -} - -// Add this line to the end of the file -apply plugin: 'com.google.gms.google-services' -``` - -If using firebase-messaging 22.0.0 and above: ``` dependencies { ... // Add these lines implementation 'com.google.firebase:firebase-messaging:22.0.0' - implementation 'com.google.firebase:firebase-installations:17.1.0' - implementation 'com.pusher:push-notifications-android:1.9.2' + implementation 'com.pusher:push-notifications-android:1.10.0' } // Add this line to the end of the file diff --git a/pushnotifications/build.gradle b/pushnotifications/build.gradle index a1ab16d..3d571cd 100644 --- a/pushnotifications/build.gradle +++ b/pushnotifications/build.gradle @@ -6,10 +6,10 @@ android { compileSdkVersion 31 defaultConfig { - minSdkVersion 16 + minSdkVersion 24 targetSdkVersion 31 versionCode 1 - versionName "1.9.2" + versionName "1.10.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -62,10 +62,11 @@ dependencies { lintChecks project(':pushnotifications-lint') testImplementation 'junit:junit:4.12' + testImplementation 'org.hamcrest:hamcrest:2.2' testImplementation 'androidx.test:core:1.5.0' testImplementation 'androidx.test.ext:junit:1.1.5' testImplementation 'androidx.test.ext:truth:1.5.0' - testImplementation "org.mockito:mockito-core:2.13.0" + testImplementation "org.mockito:mockito-core:3.6.28" androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test.ext:junit:1.1.5' diff --git a/pushnotifications/gradle.properties b/pushnotifications/gradle.properties index cae6dde..fb0da0b 100644 --- a/pushnotifications/gradle.properties +++ b/pushnotifications/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1.9.2 +VERSION_NAME=1.10.0 VERSION_CODE=1 GROUP=com.pusher diff --git a/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/DeviceStateStoreTest.kt b/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/DeviceStateStoreTest.kt index 293d09b..f69a6f2 100644 --- a/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/DeviceStateStoreTest.kt +++ b/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/DeviceStateStoreTest.kt @@ -4,12 +4,12 @@ import android.content.Context import android.content.SharedPreferences import org.hamcrest.CoreMatchers.`is` import org.hamcrest.CoreMatchers.equalTo -import org.junit.Assert import org.junit.Test import org.mockito.Mockito import org.mockito.Mockito.`when` import org.junit.Before import org.mockito.Mockito.doNothing +import org.hamcrest.MatcherAssert.assertThat class DeviceStateStoreTest { private val context: Context = Mockito.mock(Context::class.java) @@ -32,8 +32,8 @@ class DeviceStateStoreTest { .thenReturn(mutableSetOf()) .thenReturn(mutableSetOf("i-123")) - Assert.assertThat(testDeviceStateStore.instanceIds, `is`(emptySet())) - Assert.assertThat(testDeviceStateStore.instanceIds, `is`(equalTo(mutableSetOf("i-123")))) + assertThat(testDeviceStateStore.instanceIds, `is`(emptySet())) + assertThat(testDeviceStateStore.instanceIds, `is`(equalTo(mutableSetOf("i-123")))) } @Test diff --git a/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/InstanceDeviceStateStoreTest.kt b/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/InstanceDeviceStateStoreTest.kt index a303d85..0339c73 100644 --- a/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/InstanceDeviceStateStoreTest.kt +++ b/pushnotifications/src/test/java/com/pusher/pushnotifications/internal/InstanceDeviceStateStoreTest.kt @@ -10,6 +10,7 @@ import org.mockito.Mockito import org.mockito.Mockito.`when` import org.junit.Before import org.mockito.Mockito.doNothing +import org.hamcrest.MatcherAssert.assertThat class InstanceDeviceStateStoreTest { private val context: Context = Mockito.mock(Context::class.java) @@ -31,7 +32,7 @@ class InstanceDeviceStateStoreTest { .thenReturn("i-123") Assert.assertNull(testInstanceDeviceStateStore.deviceId) - Assert.assertThat(testInstanceDeviceStateStore.deviceId, `is`(equalTo("i-123"))) + assertThat(testInstanceDeviceStateStore.deviceId, `is`(equalTo("i-123"))) } @Test @@ -51,7 +52,7 @@ class InstanceDeviceStateStoreTest { .thenReturn("i-123") Assert.assertNull(testInstanceDeviceStateStore.FCMToken) - Assert.assertThat(testInstanceDeviceStateStore.FCMToken, `is`(equalTo("i-123"))) + assertThat(testInstanceDeviceStateStore.FCMToken, `is`(equalTo("i-123"))) } @Test @@ -71,7 +72,7 @@ class InstanceDeviceStateStoreTest { .thenReturn("i-123") Assert.assertNull(testInstanceDeviceStateStore.osVersion) - Assert.assertThat(testInstanceDeviceStateStore.osVersion, `is`(equalTo("i-123"))) + assertThat(testInstanceDeviceStateStore.osVersion, `is`(equalTo("i-123"))) } @Test @@ -91,7 +92,7 @@ class InstanceDeviceStateStoreTest { .thenReturn("i-123") Assert.assertNull(testInstanceDeviceStateStore.sdkVersion) - Assert.assertThat(testInstanceDeviceStateStore.sdkVersion, `is`(equalTo("i-123"))) + assertThat(testInstanceDeviceStateStore.sdkVersion, `is`(equalTo("i-123"))) } @Test @@ -110,8 +111,8 @@ class InstanceDeviceStateStoreTest { .thenReturn(mutableSetOf()) .thenReturn(mutableSetOf("hello")) - Assert.assertThat(testInstanceDeviceStateStore.interests, `is`(emptySet())) - Assert.assertThat(testInstanceDeviceStateStore.interests, `is`(equalTo(mutableSetOf("hello")))) + assertThat(testInstanceDeviceStateStore.interests, `is`(emptySet())) + assertThat(testInstanceDeviceStateStore.interests, `is`(equalTo(mutableSetOf("hello")))) } @Test