diff --git a/gradle.properties b/gradle.properties index 0228aa21..839fd39c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ kotlin.code.style=official -org.gradle.configuration-cache=false +org.gradle.configuration-cache=true org.gradle.caching=true kotlin.mpp.applyDefaultHierarchyTemplate=false #kotlin.mpp.import.enableKgpDependencyResolution=true -kotlin.native.cacheKind.iosSimulatorArm64=none -kotlin.native.cacheKind.iosArm64=none +#kotlin.native.cacheKind.iosSimulatorArm64=none +#kotlin.native.cacheKind.iosArm64=none org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 VERSION_NAME=0.8.0-DEV diff --git a/pubnub-chat-api/api/pubnub-chat-api.api b/pubnub-chat-api/api/pubnub-chat-api.api index 78050408..d4ab2144 100644 --- a/pubnub-chat-api/api/pubnub-chat-api.api +++ b/pubnub-chat-api/api/pubnub-chat-api.api @@ -75,7 +75,7 @@ public abstract interface class com/pubnub/chat/Chat { public abstract fun getCurrentUser ()Lcom/pubnub/chat/User; public abstract fun getCurrentUserMentions (Ljava/lang/Long;Ljava/lang/Long;I)Lcom/pubnub/kmp/PNFuture; public abstract fun getEventsHistory (Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;I)Lcom/pubnub/kmp/PNFuture; - public abstract fun getPubNub ()Lcom/pubnub/kmp/PubNub; + public abstract fun getPubNub ()Lcom/pubnub/api/PubNub; public abstract fun getPushChannels ()Lcom/pubnub/kmp/PNFuture; public abstract fun getThreadChannel (Lcom/pubnub/chat/Message;)Lcom/pubnub/kmp/PNFuture; public abstract fun getUnreadMessagesCounts (Ljava/lang/Integer;Lcom/pubnub/api/models/consumer/objects/PNPage;Ljava/lang/String;Ljava/util/Collection;)Lcom/pubnub/kmp/PNFuture; diff --git a/pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/Chat.kt b/pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/Chat.kt index 4f1deb71..483fa69d 100644 --- a/pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/Chat.kt +++ b/pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/Chat.kt @@ -1,5 +1,6 @@ package com.pubnub.chat +import com.pubnub.api.PubNub import com.pubnub.api.models.consumer.PNPublishResult import com.pubnub.api.models.consumer.objects.PNKey import com.pubnub.api.models.consumer.objects.PNMembershipKey @@ -22,7 +23,6 @@ import com.pubnub.chat.types.GetEventsHistoryResult import com.pubnub.chat.user.GetUsersResponse import com.pubnub.kmp.CustomObject import com.pubnub.kmp.PNFuture -import com.pubnub.kmp.PubNub import kotlin.reflect.KClass interface Chat { diff --git a/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/ChatImpl.kt b/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/ChatImpl.kt index ec033250..ba0a31b1 100644 --- a/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/ChatImpl.kt +++ b/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/ChatImpl.kt @@ -1,6 +1,7 @@ package com.pubnub.chat.internal import com.benasher44.uuid.uuid4 +import com.pubnub.api.PubNub import com.pubnub.api.PubNubException import com.pubnub.api.enums.PNPushType import com.pubnub.api.models.consumer.PNBoundedPage @@ -79,7 +80,6 @@ import com.pubnub.chat.types.UserMentionData import com.pubnub.chat.user.GetUsersResponse import com.pubnub.kmp.CustomObject import com.pubnub.kmp.PNFuture -import com.pubnub.kmp.PubNub import com.pubnub.kmp.alsoAsync import com.pubnub.kmp.asFuture import com.pubnub.kmp.awaitAll diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChannelTest.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChannelTest.kt index f7a23ff5..e36b2eb6 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChannelTest.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChannelTest.kt @@ -1,5 +1,6 @@ package com.pubnub.kmp +import com.pubnub.api.PubNub import com.pubnub.api.PubNubException import com.pubnub.api.UserId import com.pubnub.api.endpoints.FetchMessages diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChatTest.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChatTest.kt index 2e9aa91c..72a610cd 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChatTest.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/ChatTest.kt @@ -1,6 +1,7 @@ package com.pubnub.kmp import com.benasher44.uuid.uuid4 +import com.pubnub.api.PubNub import com.pubnub.api.PubNubException import com.pubnub.api.UserId import com.pubnub.api.endpoints.FetchMessages @@ -1068,7 +1069,7 @@ class ChatTest : BaseTest() { val startTimetoken = 123L val endTimetoken = 456L val count = 2 - every { pubnub.fetchMessages(any(), any(), any(), any(), any(), any()) } returns fetchMessages + every { pubnub.fetchMessages(any(), any(), any(), any(), any(), any()) } returns fetchMessages every { fetchMessages.async(any()) } calls { (callback: Consumer>) -> callback.accept( Result.success( @@ -1117,7 +1118,7 @@ class ChatTest : BaseTest() { val user2 = "myUser2" val startTimetoken = 123L val endTimetoken = 456L - every { pubnub.fetchMessages(any(), any(), any(), any(), any(), any()) } returns fetchMessages + every { pubnub.fetchMessages(any(), any(), any(), any(), any(), any()) } returns fetchMessages every { fetchMessages.async(any()) } calls { (callback: Consumer>) -> callback.accept( Result.success( diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/MembershipTest.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/MembershipTest.kt index 0c27f052..d68ec14a 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/MembershipTest.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/MembershipTest.kt @@ -1,5 +1,6 @@ package com.pubnub.kmp +import com.pubnub.api.PubNub import com.pubnub.api.endpoints.MessageCounts import com.pubnub.api.models.consumer.history.PNMessageCountResult import com.pubnub.api.v2.callbacks.Consumer diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/UserTest.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/UserTest.kt index f935f193..8dc02776 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/UserTest.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/UserTest.kt @@ -1,5 +1,6 @@ package com.pubnub.kmp +import com.pubnub.api.PubNub import com.pubnub.api.PubNubException import com.pubnub.api.endpoints.objects.membership.GetMemberships import com.pubnub.api.models.consumer.objects.PNMembershipKey diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/utils/FakeChat.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/utils/FakeChat.kt index 02979711..5a1aecf8 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/utils/FakeChat.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/kmp/utils/FakeChat.kt @@ -1,5 +1,6 @@ package com.pubnub.kmp.utils +import com.pubnub.api.PubNub import com.pubnub.api.models.consumer.PNPublishResult import com.pubnub.api.models.consumer.objects.PNKey import com.pubnub.api.models.consumer.objects.PNMembershipKey @@ -27,7 +28,6 @@ import com.pubnub.chat.types.GetEventsHistoryResult import com.pubnub.chat.user.GetUsersResponse import com.pubnub.kmp.CustomObject import com.pubnub.kmp.PNFuture -import com.pubnub.kmp.PubNub import kotlin.reflect.KClass abstract class FakeChat(override val config: ChatConfiguration, override val pubNub: PubNub) : ChatInternal { diff --git a/pubnub-kotlin b/pubnub-kotlin index e8d77b5d..85636e0b 160000 --- a/pubnub-kotlin +++ b/pubnub-kotlin @@ -1 +1 @@ -Subproject commit e8d77b5d376f50563fa1b373ff54452cfe1be09f +Subproject commit 85636e0bdf8decc6a8b2e5e692da8887c56f175e