[pigeon] feat(pigeon): expose SwiftOptions (#2271)

This commit is contained in:
Guillaume Bernos
2022-08-25 14:31:47 +02:00
committed by GitHub
parent 48778beb84
commit a5d708d87d
5 changed files with 30 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 4.0.1
* Exposes `SwiftOptions`.
## 4.0.0
* [java] **BREAKING CHANGE**: Changes style for enum values from camelCase to snake_case.

View File

@ -9,7 +9,7 @@ import 'dart:mirrors';
import 'ast.dart';
/// The current version of pigeon. This must match the version in pubspec.yaml.
const String pigeonVersion = '4.0.0';
const String pigeonVersion = '4.0.1';
/// Read all the content from [stdin] to a String.
String readStdin() {

View File

@ -9,3 +9,4 @@ export 'dart_generator.dart' show DartOptions;
export 'java_generator.dart' show JavaOptions;
export 'objc_generator.dart' show ObjcOptions;
export 'pigeon_lib.dart';
export 'swift_generator.dart' show SwiftOptions;

View File

@ -2,7 +2,7 @@ name: pigeon
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
repository: https://github.com/flutter/packages/tree/main/packages/pigeon
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apigeon
version: 4.0.0 # This must match the version in lib/generator_tools.dart
version: 4.0.1 # This must match the version in lib/generator_tools.dart
environment:
sdk: ">=2.12.0 <3.0.0"

View File

@ -0,0 +1,23 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:pigeon/pigeon.dart';
import 'package:test/test.dart';
void main() {
test('Should be able to import JavaOptions', () async {
const JavaOptions javaOptions = JavaOptions();
expect(javaOptions, isNotNull);
});
test('Should be able to import ObjcOptions', () async {
const ObjcOptions objcOptions = ObjcOptions();
expect(objcOptions, isNotNull);
});
test('Should be able to import SwiftOptions', () async {
const SwiftOptions swiftOptions = SwiftOptions();
expect(swiftOptions, isNotNull);
});
}