Skip to content

Commit 9432cef

Browse files
committed
move mobile specific code into the respective package
1 parent f7d536a commit 9432cef

21 files changed

+2789
-1793
lines changed

example/ios/Podfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- flutter_reactive_ble (0.0.1):
3+
- Protobuf (3.17.0)
4+
- reactive_ble_mobile (0.0.1):
45
- Flutter
56
- Protobuf (~> 3.5)
67
- SwiftProtobuf (~> 1.0)
7-
- Protobuf (3.13.0)
8-
- SwiftProtobuf (1.12.0)
8+
- SwiftProtobuf (1.17.0)
99

1010
DEPENDENCIES:
1111
- Flutter (from `Flutter`)
12-
- flutter_reactive_ble (from `.symlinks/plugins/flutter_reactive_ble/ios`)
12+
- reactive_ble_mobile (from `.symlinks/plugins/reactive_ble_mobile/ios`)
1313

1414
SPEC REPOS:
1515
trunk:
@@ -19,14 +19,14 @@ SPEC REPOS:
1919
EXTERNAL SOURCES:
2020
Flutter:
2121
:path: Flutter
22-
flutter_reactive_ble:
23-
:path: ".symlinks/plugins/flutter_reactive_ble/ios"
22+
reactive_ble_mobile:
23+
:path: ".symlinks/plugins/reactive_ble_mobile/ios"
2424

2525
SPEC CHECKSUMS:
2626
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
27-
flutter_reactive_ble: ac0ccac596f481b221549cad2abe16987e1f411b
28-
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
29-
SwiftProtobuf: 4ef85479c18ca85b5482b343df9c319c62bda699
27+
Protobuf: 7327d4444215b5f18e560a97f879ff5503c4581c
28+
reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c
29+
SwiftProtobuf: 9c85136c6ba74b0a1b84279dbf0f6db8efb714e0
3030

3131
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
3232

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@
264264
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
265265
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
266266
"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
267-
"${BUILT_PRODUCTS_DIR}/flutter_reactive_ble/flutter_reactive_ble.framework",
267+
"${BUILT_PRODUCTS_DIR}/reactive_ble_mobile/reactive_ble_mobile.framework",
268268
);
269269
name = "[CP] Embed Pods Frameworks";
270270
outputPaths = (
271271
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
272272
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
273-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_reactive_ble.framework",
273+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/reactive_ble_mobile.framework",
274274
);
275275
runOnlyForDeploymentPostprocessing = 0;
276276
shellPath = /bin/sh;

packages/flutter_reactive_ble/lib/src/generated/bledata.pb.dart

Lines changed: 0 additions & 1676 deletions
This file was deleted.

packages/flutter_reactive_ble/lib/src/reactive_ble.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import 'package:flutter_reactive_ble/src/discovered_devices_registry.dart';
99
import 'package:flutter_reactive_ble/src/rx_ext/repeater.dart';
1010
import 'package:meta/meta.dart';
1111
import 'package:reactive_ble_platform_interface/reactive_ble_platform_interface.dart';
12-
13-
import 'plugin_controller.dart';
12+
import 'package:reactive_ble_mobile/reactive_ble_mobile.dart';
1413

1514
/// [FlutterReactiveBle] is the facade of the library. Its interface allows to
1615
/// perform all the supported BLE operations.
@@ -105,7 +104,7 @@ class FlutterReactiveBle {
105104
print,
106105
);
107106

108-
ReactiveBlePlatform.instance = const PluginControllerFactory().create();
107+
ReactiveBlePlatform.instance = const ReactiveBleMobilePlatformFactory().create();
109108

110109
_blePlatform = ReactiveBlePlatform.instance;
111110

packages/flutter_reactive_ble/pubspec.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ packages:
348348
source: hosted
349349
version: "1.5.0"
350350
protobuf:
351-
dependency: "direct main"
351+
dependency: transitive
352352
description:
353353
name: protobuf
354354
url: "https://pub.dartlang.org"
@@ -368,6 +368,13 @@ packages:
368368
url: "https://pub.dartlang.org"
369369
source: hosted
370370
version: "1.0.0"
371+
reactive_ble_mobile:
372+
dependency: "direct main"
373+
description:
374+
path: "../reactive_ble_mobile"
375+
relative: true
376+
source: path
377+
version: "0.0.1"
371378
reactive_ble_platform_interface:
372379
dependency: "direct main"
373380
description:
@@ -494,4 +501,4 @@ packages:
494501
version: "3.1.0"
495502
sdks:
496503
dart: ">=2.12.0 <3.0.0"
497-
flutter: ">=1.17.0"
504+
flutter: ">=1.20.0"

packages/flutter_reactive_ble/pubspec.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,25 @@ environment:
77
sdk: '>=2.12.0 <3.0.0'
88
flutter: ">=1.17.0"
99

10+
flutter:
11+
plugin:
12+
platforms:
13+
android:
14+
default_package: reactive_ble_mobile
15+
ios:
16+
default_package: reactive_ble_mobile
17+
1018
dependencies:
1119
collection: ^1.15.0
1220
flutter:
1321
sdk: flutter
22+
reactive_ble_mobile:
23+
path: ../reactive_ble_mobile
1424
reactive_ble_platform_interface:
1525
path: ../reactive_ble_platform_interface
1626
functional_data: ^1.0.0
1727
meta: ^1.3.0
1828
pedantic: ^1.11.1
19-
protobuf: ^2.0.0
2029

2130
dev_dependencies:
2231
build_runner: ^2.1.0

packages/reactive_ble_mobile/ios/Classes/ReactiveBlePlugin.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "ReactiveBlePlugin.h"
2-
#import <flutter_reactive_ble/flutter_reactive_ble-Swift.h>
2+
#import <reactive_ble_mobile/reactive_ble_mobile-Swift.h>
33

44
@implementation ReactiveBlePlugin
55
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {

packages/reactive_ble_mobile/ios/flutter_reactive_ble.podspec renamed to packages/reactive_ble_mobile/ios/reactive_ble_mobile.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Pod::Spec.new do |s|
2-
s.name = 'flutter_reactive_ble'
2+
s.name = 'reactive_ble_mobile'
33
s.version = '0.0.1'
44
s.summary = 'Bluetooth Low Energy (BLE) Flutter plug-in'
55
s.description = <<-DESC
Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1+
library reactive_ble_mobile;
12

2-
import 'dart:async';
3-
4-
import 'package:flutter/services.dart';
5-
6-
class ReactiveBleMobile {
7-
static const MethodChannel _channel =
8-
const MethodChannel('reactive_ble_mobile');
9-
10-
static Future<String?> get platformVersion async {
11-
final String? version = await _channel.invokeMethod('getPlatformVersion');
12-
return version;
13-
}
14-
}
3+
export 'src/reactive_ble_mobile_platform.dart';

0 commit comments

Comments
 (0)