Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Fix summarizer nested class bug (#312)
Browse files Browse the repository at this point in the history
* Fix inner classes
* Fix nested class finding
* Remove -r and -v options
* Add checks for nested classes in config
* Remove problematic steps from GH action
* Add anonymous inner class example
* Use sorted() for deterministic order
* Refactor ClassFinder logic and add Unit test
* Filter anonymous classes in summarizer itself
  • Loading branch information
mahesh-hegde committed Jul 5, 2023
1 parent a1a5995 commit c7fbb15
Show file tree
Hide file tree
Showing 30 changed files with 1,326 additions and 160 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,6 @@ jobs:
sudo apt-get install -y ninja-build libgtk-3-dev clang-format
- run: flutter config --enable-linux-desktop
- run: dart pub get
- name: Generate bindings
run: |
dart run jnigen -Doutput.c.path=_c/ -Doutput.dart.path=_dart/ --config jnigen.yaml
- name: Compare generated bindings
run: |
diff -r _c src/
diff -r _dart lib/src/third_party
- name: Generate full bindings
run: dart run jnigen --config jnigen.yaml --override classes="org.apache.pdfbox"
- name: Analyze generated bindings
Expand Down
2 changes: 1 addition & 1 deletion jni/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.5.0"
version: "0.6.0-dev.1"
js:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion jni/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: jni
description: Library to access JNI from dart and flutter
version: 0.5.0
version: 0.6.0-dev.1
repository: https://github.com/dart-lang/jnigen/tree/main/jni

environment:
Expand Down
4 changes: 4 additions & 0 deletions jnigen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.0-dev.1
* **Breaking Change** Specifying a class always pulls in nested classes by default. If a nested class is specified in config, it will be an error.
* Save all `jnigen` logs to a file in `.dart_tool/jnigen/logs/`. This is useful for debugging.

## 0.6.0-dev.0
* **Breaking Change** Removed `suspend_fun_to_async` flag from the config. It's now happening by default since we read the Kotlin's metadata and reliably identify the `suspend fun`s.

Expand Down
1 change: 1 addition & 0 deletions jnigen/bin/jnigen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:jnigen/jnigen.dart';
import 'package:jnigen/src/logging/logging.dart';

void main(List<String> args) async {
enableLoggingToFile();
Config config;
try {
config = Config.parseArgs(args);
Expand Down
Loading

0 comments on commit c7fbb15

Please sign in to comment.