Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.github.chinloyal.pusher_client'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '2.0.20'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,18 +25,27 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
compileSdkVersion 35
namespace "com.github.chinloyal.pusher_client"


sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 16
minSdkVersion 21
}
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}
dependencies {
implementation "com.pusher:pusher-java-client:2.2.5"
}
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
38 changes: 17 additions & 21 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
PODS:
- Flutter (1.0.0)
- pusher_client (1.0.0):
- NWWebSocket (0.5.3)
- pusher_client (2.0.0):
- Flutter
- PusherSwiftWithEncryption (~> 8.0.0)
- PusherSwiftWithEncryption (8.0.0):
- ReachabilitySwift (~> 5.0)
- Sodium (= 0.8.0)
- Starscream (~> 3.1)
- ReachabilitySwift (5.0.0)
- Sodium (0.8.0)
- Starscream (3.1.1)
- PusherSwift (~> 10.1.0)
- PusherSwift (10.1.4):
- NWWebSocket (~> 0.5.3)
- TweetNacl (~> 1.0.0)
- TweetNacl (1.0.2)

DEPENDENCIES:
- Flutter (from `Flutter`)
- pusher_client (from `.symlinks/plugins/pusher_client/ios`)

SPEC REPOS:
trunk:
- PusherSwiftWithEncryption
- ReachabilitySwift
- Sodium
- Starscream
- NWWebSocket
- PusherSwift
- TweetNacl

EXTERNAL SOURCES:
Flutter:
Expand All @@ -29,13 +26,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/pusher_client/ios"

SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
pusher_client: 98d16b50f0ebb4d67d3f61b29723142c03179da9
PusherSwiftWithEncryption: 8ed9c9cf743b0530aa3a8c60de6734475f1aa67d
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
Sodium: 63c0ca312a932e6da481689537d4b35568841bdc
Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
NWWebSocket: 05fc4419102f33934f87157d70228837e327064f
pusher_client: 03cc77e806ec008086cd8f6b5d50849c73adae59
PusherSwift: 671c49e9c5441e30960d2e0282a879b2f8c80bcb
TweetNacl: 3abf4d1d2082b0114e7a67410e300892448951e6

PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa
PODFILE CHECKSUM: 775997f741c536251164e3eacf6e34abf2eb7a17

COCOAPODS: 1.9.3
COCOAPODS: 1.14.3
16 changes: 8 additions & 8 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
PusherClient pusher;
Channel channel;
late PusherClient pusher;
late Channel channel;

@override
void initState() {
Expand All @@ -41,19 +41,19 @@ class _MyAppState extends State<MyApp> {
channel = pusher.subscribe("private-orders");

pusher.onConnectionStateChange((state) {
log("previousState: ${state.previousState}, currentState: ${state.currentState}");
log("previousState: ${state?.previousState}, currentState: ${state?.currentState}");
});

pusher.onConnectionError((error) {
log("error: ${error.message}");
log("error: ${error?.message}");
});

channel.bind('status-update', (event) {
log(event.data);
log(event?.data?.toString() ?? '');
});

channel.bind('order-filled', (event) {
log("Order Filled Event" + event.data.toString());
log("Order Filled Event" + (event?.data.toString() ?? ''));
});
}

Expand Down Expand Up @@ -90,8 +90,8 @@ class _MyAppState extends State<MyApp> {
ElevatedButton(
child: Text('Bind Status Update'),
onPressed: () {
channel.bind('status-update', (PusherEvent event) {
log("Status Update Event" + event.data.toString());
channel.bind('status-update', (PusherEvent? event) {
log("Status Update Event" + (event?.data?.toString() ?? ''));
});
},
),
Expand Down
117 changes: 68 additions & 49 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,58 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.17.1"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.0.6"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -67,27 +67,46 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.10"
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.9.1"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.8.3"
pusher_client:
dependency: "direct main"
description:
Expand All @@ -104,58 +123,58 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.5.1"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.4"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=3.0.5 <4.0.0"
flutter: ">=1.20.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Demonstrates how to use the pusher_client plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=3.0.5 <4.0.0"

dependencies:
flutter:
Expand Down
4 changes: 2 additions & 2 deletions example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ void main() {
// Verify that platform version is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
widget.data.startsWith('Running on:'),
(Widget widget) =>
widget is Text && (widget.data ?? '').startsWith('Running on:'),
),
findsOneWidget,
);
Expand Down
Loading