Skip to content

Commit

Permalink
dart_native_gen 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed Apr 19, 2022
1 parent eeeba7a commit 7862baa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dart_native/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
ffi: ^1.0.0
dart_native_gen: ^0.3.1
dart_native_gen: ^0.3.2

dev_dependencies:
flutter_test:
Expand Down
4 changes: 3 additions & 1 deletion dart_native_gen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## [0.3.1] - Dependency verison compatible.
## [0.3.2] - Dependency verison compatible.

## [0.3.1] - Fix the generated import code.

## [0.3.0] - Support className for Java.

Expand Down
13 changes: 7 additions & 6 deletions dart_native_gen/lib/src/writer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ class Writer {
}

String result = "import 'package:dart_native/dart_native.dart';";
Set<String> importFiles = type == ClassType.Java
? collector.javaImportFiles
: collector.ocImportFiles;
result += importFiles.map((String importFile) {
return "import '$importFile';";
}).join('\n');

if (Collector.packageName == 'dart_native') {
result += """
bool _hadRanDartNative = false;
bool get hadRanDartNative => _hadRanDartNative;
""";
} else {
Set<String> importFiles = type == ClassType.Java
? collector.javaImportFiles
: collector.ocImportFiles;
result += importFiles.map((String importFile) {
return "import '$importFile';";
}).join('\n');
}

String functionName =
Expand Down
2 changes: 1 addition & 1 deletion dart_native_gen/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dart_native_gen
description: Automatic type conversion solution for dart_native based on source_gen through annotation.
version: 0.3.1
version: 0.3.2
homepage: https://github.com/dart-native/dart_native/

environment:
Expand Down

0 comments on commit 7862baa

Please sign in to comment.