Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: update to flutter rust bridge v2 #332

Merged
merged 13 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/combine-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ jobs:
- uses: subosito/flutter-action@v2
- uses: bluefireteam/melos-action@v2
- run: |
cargo build -r
cargo install flutter_rust_bridge_codegen
melos run codegen
git config --global user.name 'MimirActionsBot'
git config --global user.email '[email protected]'
git commit -am "chore: update generated files"
Expand Down
14 changes: 9 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Modified from very_good_analysis@5.0.0+1
# Modified from very_good_analysis@6.0.0
analyzer:
language:
strict-casts: true
Expand All @@ -10,11 +10,14 @@ analyzer:
missing_required_param: error
missing_return: error
record_literal_one_positional_no_trailing_comma: error
collection_methods_unrelated_type: warning
unrelated_type_equality_checks: warning

exclude:
- '**.freezed.dart'
- '**.g.dart'
- '**/bridge_generated.*dart'
- '**/frb_generated.*dart'
- '**/src/api.dart'
- '**/src/lib.dart'
- test/.test_coverage.dart
- lib/generated_plugin_registrant.dart

Expand Down Expand Up @@ -86,16 +89,15 @@ linter:
- implementation_imports
- implicit_reopen
- invalid_case_patterns
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_annotations
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
Expand All @@ -104,6 +106,8 @@ linter:
- no_leading_underscores_for_local_identifiers
- no_logic_in_create_state
- no_runtimeType_toString
- no_self_assignments
- no_wildcard_variable_uses
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
Expand Down
7 changes: 7 additions & 0 deletions flutter_rust_bridge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rust_input: crate::api
rust_root: packages/mimir/native/
dart_output: packages/mimir/lib/src/
full_dep: true
c_output: packages/flutter_mimir/ios/Classes/frb.h
duplicated_c_output:
- packages/flutter_mimir/macos/Classes/frb.h
4 changes: 4 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ scripts:
run: bash scripts/build-other.sh
description: Build the .tar.gz for all other platforms.

codegen:
run: flutter_rust_bridge_codegen generate
description: Run the flutter_rust_bridge code generation.

test:
run: melos run test:dart --no-select && melos run test:flutter --no-select
description: Run all Dart & Flutter tests in this project.
Expand Down
Loading
Loading