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' } diff --git a/package.json b/package.json index 0549cb5..621f8b5 100644 --- a/package.json +++ b/package.json @@ -61,8 +61,8 @@ "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" 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';