Skip to content

Commit dce9d73

Browse files
[jnigen] Throw when output folder contains non JNIgen files (#2063)
1 parent 9d8eefb commit dce9d73

File tree

21 files changed

+131
-32
lines changed

21 files changed

+131
-32
lines changed

pkgs/jnigen/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## 0.14.2-wip
22

33
- The name `factory` can now also be used in a method name without renaming.
4+
- Throw when output folder contains non JNIgen files. Users with existing
5+
package bindings will need to delete them once for it to start working.
46

57
## 0.14.1
68

@@ -9,7 +11,8 @@
911
bindings.
1012
- Fix a bug where Kotlin suspendable functions that returned the result without
1113
ever suspending would timeout in Dart.
12-
- Retrieval of dependencies uses Gradle (`GradleTools`) en lieu of Maven (`MavenTools`).
14+
- Retrieval of dependencies uses Gradle (`GradleTools`) in lieu of Maven
15+
(`MavenTools`).
1316
- Updated `bin\download_maven_jars.dart` to use `GradleTools`.
1417

1518
## 0.14.0

pkgs/jnigen/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
[![pub package](https://img.shields.io/pub/v/jnigen.svg)](https://pub.dev/packages/jnigen)
44
[![package publisher](https://img.shields.io/pub/publisher/jnigen.svg)](https://pub.dev/packages/jnigen/publisher)
55

6+
## Migrating to 0.14.2
7+
8+
When regenerating bindings after an upgrade to JNIgen in the one file per class mode, you will need to delete the old bindings once to fix `A file that was not generated by JNIgen was found in ...` error.
9+
610
## Introduction
711
Experimental bindings generator for Java bindings through dart:ffi and JNI.
812

@@ -270,10 +274,6 @@ However there are 2 caveats to this caveat.
270274
271275
The JAR files (`$SDK_ROOT/platforms/android-$VERSION/android.jar`) can be used instead. But compiled JARs do not include JavaDoc and method parameter names. This JAR is automatically included by Gradle when `android_sdk_config` >> `add_gradle_deps` is specified.
272276
273-
## Migrating to 0.8.0
274-
275-
Check [`jni`'s changelog](https://github.com/dart-lang/native/blob/main/pkgs/jni/CHANGELOG.md#080-wip) and [`jnigen`'s changelog](https://github.com/dart-lang/native/blob/main/pkgs/jnigen/CHANGELOG.md#080-wip).
276-
277277
## Contributing
278278
See the wiki for architecture-related documents.
279279

pkgs/jnigen/example/in_app_java/lib/android_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated by jnigen. DO NOT EDIT!
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
22

33
// ignore_for_file: annotate_overrides
44
// ignore_for_file: argument_type_not_assignable

pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated by jnigen. DO NOT EDIT!
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
22

33
// ignore_for_file: annotate_overrides
44
// ignore_for_file: argument_type_not_assignable

pkgs/jnigen/example/notification_plugin/lib/notifications.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
2+
13
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
24
// for details. All rights reserved. Use of this source code is governed by a
35
// BSD-style license that can be found in the LICENSE file.
46

5-
// Autogenerated by jnigen. DO NOT EDIT!
6-
77
// ignore_for_file: annotate_overrides
88
// ignore_for_file: argument_type_not_assignable
99
// ignore_for_file: camel_case_extensions

pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
2+
13
// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
24
// The following copyright from the original authors applies.
35
//
@@ -16,8 +18,6 @@
1618
// See the License for the specific language governing permissions and
1719
// limitations under the License.
1820

19-
// Autogenerated by jnigen. DO NOT EDIT!
20-
2121
// ignore_for_file: annotate_overrides
2222
// ignore_for_file: argument_type_not_assignable
2323
// ignore_for_file: camel_case_extensions

pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
2+
13
// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
24
// The following copyright from the original authors applies.
35
//
@@ -16,8 +18,6 @@
1618
// See the License for the specific language governing permissions and
1719
// limitations under the License.
1820

19-
// Autogenerated by jnigen. DO NOT EDIT!
20-
2121
// ignore_for_file: annotate_overrides
2222
// ignore_for_file: argument_type_not_assignable
2323
// ignore_for_file: camel_case_extensions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
12
export 'PDDocument.dart';
23
export 'PDDocumentInformation.dart';

pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
2+
13
// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
24
// The following copyright from the original authors applies.
35
//
@@ -16,8 +18,6 @@
1618
// See the License for the specific language governing permissions and
1719
// limitations under the License.
1820

19-
// Autogenerated by jnigen. DO NOT EDIT!
20-
2121
// ignore_for_file: annotate_overrides
2222
// ignore_for_file: argument_type_not_assignable
2323
// ignore_for_file: camel_case_extensions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT!
12
export 'PDFTextStripper.dart';

0 commit comments

Comments
 (0)