Skip to content

Commit

Permalink
[jnigen] Update lints and flutter_lints packages to v3 (#1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Apr 9, 2024
1 parent a38b555 commit 919281c
Show file tree
Hide file tree
Showing 32 changed files with 38 additions and 18 deletions.
4 changes: 4 additions & 0 deletions pkgs/jnigen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.1-wip

- Ignore `use_super_parameters` lint in generated files.

## 0.8.0

- **Breaking Change** ([#981](https://github.com/dart-lang/native/issues/981)):
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/android_test_runner/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
flutter_lints: ^3.0.2

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
1 change: 1 addition & 0 deletions pkgs/jnigen/example/in_app_java/lib/android_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/jnigen/example/in_app_java/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void main() {
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -60,7 +60,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
const MyHomePage({super.key, required this.title});

final String title;

Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/in_app_java/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dev_dependencies:
jnigen:
path: ../../

flutter_lints: ^2.0.0
flutter_lints: ^3.0.2

flutter:

Expand Down
1 change: 0 additions & 1 deletion pkgs/jnigen/example/kotlin_plugin/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:kotlin_plugin/kotlin_plugin.dart';
import 'package:jni/jni.dart';

void main() {
runApp(const MyApp());
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/kotlin_plugin/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dev_dependencies:
flutter_test:
sdk: flutter

flutter_lints: ^2.0.0
flutter_lints: ^3.0.2

flutter:
uses-material-design: true
Expand Down
1 change: 1 addition & 0 deletions pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/kotlin_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter_lints: ^3.0.2
jnigen:
path: ../../

Expand Down
4 changes: 2 additions & 2 deletions pkgs/jnigen/example/notification_plugin/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void main() {
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -43,7 +43,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatelessWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
MyHomePage({super.key, required this.title});

final String title;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
flutter_lints: ^3.0.2

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/notification_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dev_dependencies:
path: ../../
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter_lints: ^3.0.2

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ dependencies:
path: ../

dev_dependencies:
lints: ^2.0.0
lints: ^3.0.0
test: ^1.16.0
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/pdfbox_plugin/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
flutter_lints: ^3.0.2

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/jnigen/example/pdfbox_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dev_dependencies:
jnigen:
path: ../../
test: any
lints: ^2.0.0
lints: ^3.0.0

flutter:
# A JNI plugin uses FFI for calling into C code. Thus the relevant shared
Expand Down
1 change: 1 addition & 0 deletions pkgs/jnigen/lib/src/bindings/dart_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ import "package:jni/jni.dart" as jni;
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters
''';
static const preImportBoilerplate =
Expand Down
4 changes: 2 additions & 2 deletions pkgs/jnigen/lib/src/tools/android_sdk_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class _AndroidToolsException implements Exception {
}

class SdkNotFoundException extends _AndroidToolsException {
SdkNotFoundException(String message) : super(message);
SdkNotFoundException(super.message);
}

class GradleException extends _AndroidToolsException {
GradleException(String message) : super(message);
GradleException(super.message);
}

class AndroidSdkTools {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/jnigen/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: jnigen
description: A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine.
version: 0.8.0
version: 0.8.1-wip
repository: https://github.com/dart-lang/native/tree/main/pkgs/jnigen

environment:
Expand All @@ -29,7 +29,7 @@ dependencies:
cli_config: ^0.1.0

dev_dependencies:
lints: ^2.0.0
lints: ^3.0.0
jni:
path: ../jni
test: ^1.24.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
// ignore_for_file: use_super_parameters

import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
Expand Down

0 comments on commit 919281c

Please sign in to comment.