Skip to content

Commit

Permalink
Updated to use the latest protobuf (^0.9.0+1).
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldemarco committed Aug 1, 2018
1 parent 325ad41 commit 0786e91
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.4
* Updated to use the latest protobuf (^0.9.0+1)

## 0.3.3
* `scan` `withServices` to filter by service UUID's (iOS)
* Error handled when trying to scan with adapter off (Android)
Expand Down
24 changes: 15 additions & 9 deletions ios/gen/Flutterblue.pbobjc.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions lib/gen/flutterblue.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Generated code. Do not modify.
///
// ignore_for_file: non_constant_identifier_names,library_prefixes
library flutterblue;

// ignore: UNUSED_SHOWN_NAME
import 'dart:core' show int, bool, double, String, List, override;
Expand Down Expand Up @@ -118,7 +117,7 @@ class AdvertisementData extends GeneratedMessage {
List<AdvertisementData_ServiceDataEntry> get serviceData => $_getList(2);

int get txPowerLevel => $_get(3, 0);
set txPowerLevel(int v) { $_setUnsignedInt32(3, v); }
set txPowerLevel(int v) { $_setSignedInt32(3, v); }
bool hasTxPowerLevel() => $_has(3);
void clearTxPowerLevel() => clearField(4);

Expand Down Expand Up @@ -154,7 +153,7 @@ class ScanSettings extends GeneratedMessage {
}

int get androidScanMode => $_get(0, 0);
set androidScanMode(int v) { $_setUnsignedInt32(0, v); }
set androidScanMode(int v) { $_setSignedInt32(0, v); }
bool hasAndroidScanMode() => $_has(0);
void clearAndroidScanMode() => clearField(1);

Expand Down Expand Up @@ -198,7 +197,7 @@ class ScanResult extends GeneratedMessage {
void clearAdvertisementData() => clearField(2);

int get rssi => $_get(2, 0);
set rssi(int v) { $_setUnsignedInt32(2, v); }
set rssi(int v) { $_setSignedInt32(2, v); }
bool hasRssi() => $_has(2);
void clearRssi() => clearField(3);
}
Expand Down
1 change: 0 additions & 1 deletion lib/gen/flutterblue.pbenum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Generated code. Do not modify.
///
// ignore_for_file: non_constant_identifier_names,library_prefixes
library flutterblue_pbenum;

// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME
import 'dart:core' show int, dynamic, String, List, Map;
Expand Down
1 change: 0 additions & 1 deletion lib/gen/flutterblue.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Generated code. Do not modify.
///
// ignore_for_file: non_constant_identifier_names,library_prefixes
library flutterblue_pbjson;

const BluetoothState$json = const {
'1': 'BluetoothState',
Expand Down
1 change: 0 additions & 1 deletion lib/gen/flutterblue.pbserver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Generated code. Do not modify.
///
// ignore_for_file: non_constant_identifier_names,library_prefixes
library flutterblue_pbserver;

export 'flutterblue.pb.dart';

6 changes: 3 additions & 3 deletions protos/regenerate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Generate protobuf files in Dart
1. If upgrading, delete all proto files from /home/.pub-cache/bin
1. Get the latest linux protoc compiler from https://github.com/google/protobuf/releases/ (protoc-X.X.X-linux-x86_64.zip)
1. Copy /bin/protoc into /home/.pub-cache/bin/
1. Clone the latest dart-protoc-plugin from https://github.com/dart-lang/dart-protoc-plugin
1. Run `pub install` inside dart-protoc-plugin
1. Run `pub global activate protoc_plugin` to get .dart files into /home/.pub-cache/bin/
1. Run the following command from the protos folder
1. Get the latest linux protoc compiler from https://github.com/google/protobuf/releases/ (protoc-X.X.X-linux-x86_64.zip)
1. Copy /bin/protoc into /home/.pub-cache/bin/
1. Run the following commands from the protos folder
```protoc --dart_out=../lib/gen ./flutterblue.proto```
```protoc --objc_out=../ios/gen ./flutterblue.proto```
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
flutter:
sdk: flutter
convert: '^2.0.1'
protobuf: '^0.7.1'
protobuf: '^0.9.0+1'

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 0786e91

Please sign in to comment.