From aadb3f21c0aa901d94cf35fea32d708ec7bb9774 Mon Sep 17 00:00:00 2001 From: Emmanuel Ikechukwu Date: Sat, 1 Jun 2024 19:39:03 +0100 Subject: [PATCH 1/4] Pass string to android native instance --- src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 5c04965..cb6309d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -352,10 +352,11 @@ export class Pusher { event.channelName.startsWith('private-') || event.channelName.startsWith('presence-') ) { + const data = Platform.OS === 'android' ? JSON.stringify(event.data ?? {}) : event.data await PusherWebsocketReactNative.trigger( event.channelName, event.eventName, - event.data + data ); } else { throw 'Trigger event is only for private/presence channels'; From f08821cc2515cc720b741f7838e7de844f501b27 Mon Sep 17 00:00:00 2001 From: Emmanuel Ikechukwu Date: Tue, 4 Jun 2024 09:23:09 +0100 Subject: [PATCH 2/4] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0549cb5..d9bc5c9 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,8 @@ "typescript": "^4.8.4" }, "peerDependencies": { - "react": "*", - "react-native": "*" + "react": "18.2.0", + "react-native": "0.71.3" }, "jest": { "preset": "react-native", From bac2719d87959ca691f016ea2e1752f637160552 Mon Sep 17 00:00:00 2001 From: Emmanuel Ikechukwu Date: Tue, 4 Jun 2024 09:33:10 +0100 Subject: [PATCH 3/4] Update package.json --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d9bc5c9..621f8b5 100644 --- a/package.json +++ b/package.json @@ -61,15 +61,15 @@ "jest": "^29.3.1", "pod-install": "^0.1.38", "prettier": "^2.7.1", - "react": "17.0.2", - "react-native": "0.68.3", + "react": "18.2.0", + "react-native": "0.71.3", "react-native-builder-bob": "^0.20.1", "release-it": "^15.5.0", "typescript": "^4.8.4" }, "peerDependencies": { - "react": "18.2.0", - "react-native": "0.71.3" + "react": "*", + "react-native": "*" }, "jest": { "preset": "react-native", From 74902aae3bfbbe6757939c8e7479587ead59c12a Mon Sep 17 00:00:00 2001 From: Emmanuel Ikechukwu Date: Mon, 17 Jun 2024 03:32:45 +0100 Subject: [PATCH 4/4] Update build.gradle --- android/build.gradle | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 0573aaa..58a704a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -34,10 +34,32 @@ android { } buildTypes { + debug { + minifyEnabled false + } release { minifyEnabled false } } + // Ensure correct order of tasks + tasks.configureEach { task -> + logger.info("Task Dependency Config: ${task.name}") + if (task.name == 'generateDebugRFile') { + task.dependsOn(':pusher_pusher-websocket-react-native:processDebugManifest', ':pusher-websocket-react-native:parseDebugLocalResources') + } + if (task.name == 'compileDebugKotlin') { + task.dependsOn(':pusher-websocket-react-native:generateDebugBuildConfig', ':pusher-websocket-react-native:generateDebugRFile', ':pusher-websocket-react-native:compileDebugAidl') + } + if(task.name == 'copyDebugJniLibsProjectOnly') { + task.dependsOn(':pusher-websocket-react-native:mergeDebugNativeLibs') + } + if(task.name == 'packageDebugAssets') { + task.dependsOn(':pusher-websocket-react-native:compileDebugShaders') + } + if(task.name == 'parseDebugLocalResources') { + task.dependsOn(':pusher-websocket-react-native:packageDebugResources') + } + } lintOptions { disable 'GradleCompatible' }