diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index e34caa1..3e902db 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -19,8 +19,6 @@ jobs: - run: dart --version - run: flutter --version - run: flutter pub get - - name: enable asset building - run: flutter config --enable-native-assets - name: Lint analysis run: dart analyze - name: Dart format diff --git a/examples/flutter_app/analysis_options.yaml b/examples/flutter_app/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/examples/flutter_app/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/importer/hook/build.dart b/importer/hook/build.dart index c086a3d..af794f7 100644 --- a/importer/hook/build.dart +++ b/importer/hook/build.dart @@ -1,7 +1,6 @@ import 'dart:io'; - import 'package:logging/logging.dart'; -import 'package:native_assets_cli/native_assets_cli.dart'; +import 'package:hooks/hooks.dart'; void main(List args) async { await build(args, (config, output) async { diff --git a/importer/lib/build_hooks.dart b/importer/lib/build_hooks.dart index 2ee7660..ceb5d5b 100644 --- a/importer/lib/build_hooks.dart +++ b/importer/lib/build_hooks.dart @@ -1,6 +1,6 @@ import 'dart:io'; +import 'package:hooks/hooks.dart'; -import 'package:native_assets_cli/native_assets_cli.dart'; void buildModels({ required BuildInput buildInput, @@ -26,12 +26,11 @@ void buildModels({ outputFileName = '${outputFileName.substring(0, outputFileName.lastIndexOf('.'))}.model'; - /// dart --enable-experiment=native-assets run flutter_scene_importer:import \ + /// run flutter_scene_importer:import \ /// --input --output --working-directory final importerResult = Process.runSync( dartExec.toFilePath(), [ - '--enable-experiment=native-assets', 'run', 'flutter_scene_importer:import', '--input', diff --git a/importer/pubspec.lock b/importer/pubspec.lock index ca25cf2..0a41200 100644 --- a/importer/pubspec.lock +++ b/importer/pubspec.lock @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" fake_async: dependency: transitive description: @@ -88,30 +88,38 @@ packages: description: flutter source: sdk version: "0.0.0" + hooks: + dependency: "direct main" + description: + name: hooks + sha256: "6274d1fe704962cbb881d437aae11af3e6eecc810da7438cc100c85679b4feb6" + url: "https://pub.dev" + source: hosted + version: "0.20.4" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -152,14 +160,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.16.0" - native_assets_cli: - dependency: "direct main" - description: - name: native_assets_cli - sha256: "0907c5b85a21ae08dcdd0d2b75061cc614939911c2cab5ac903f35a9fbb2a50b" - url: "https://pub.dev" - source: hosted - version: "0.13.0" path: dependency: transitive description: @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" sky_engine: dependency: transitive description: flutter @@ -225,26 +225,26 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: "direct main" description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -257,10 +257,10 @@ packages: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: - dart: ">=3.7.0 <4.0.0" + dart: ">=3.9.0 <4.0.0" flutter: ">=3.29.0-1.0.pre.242" diff --git a/importer/pubspec.yaml b/importer/pubspec.yaml index 7352ec5..f418a73 100644 --- a/importer/pubspec.yaml +++ b/importer/pubspec.yaml @@ -20,8 +20,8 @@ dependencies: flutter_gpu: sdk: flutter logging: ^1.2.0 - native_assets_cli: '>=0.13.0 <0.14.0' vector_math: ^2.1.4 + hooks: ^0.20.4 dev_dependencies: flutter_test: diff --git a/pubspec.yaml b/pubspec.yaml index 673f70e..f1ced66 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,13 +26,14 @@ dependencies: #flutter_scene_importer: ^0.9.0-0 flutter_scene_importer: path: ./importer + hooks: ^0.20.4 native_assets_cli: '>=0.13.0 <0.14.0' vector_math: ^2.1.4 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 test: ^1.25.15 flutter: