diff --git a/.github/workflows/swift2objc.yaml b/.github/workflows/swift2objc.yaml index 8d13a1f8e7..7fc7561392 100644 --- a/.github/workflows/swift2objc.yaml +++ b/.github/workflows/swift2objc.yaml @@ -6,12 +6,12 @@ on: branches: [main, stable] paths: - '.github/workflows/swift2objc.yaml' - - 'pkgs/swiftgen/swift2objc/**' + - 'pkgs/swift2objc/**' pull_request: branches: [main, stable] paths: - '.github/workflows/swift2objc.yaml' - - 'pkgs/swiftgen/swift2objc/**' + - 'pkgs/swift2objc/**' schedule: - cron: "0 0 * * 0" @@ -24,7 +24,7 @@ jobs: runs-on: macos-latest defaults: run: - working-directory: pkgs/swiftgen/swift2objc/ + working-directory: pkgs/swift2objc/ strategy: fail-fast: false steps: @@ -47,7 +47,7 @@ jobs: runs-on: 'macos-latest' defaults: run: - working-directory: pkgs/swiftgen/swift2objc/ + working-directory: pkgs/swift2objc/ steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 @@ -63,7 +63,7 @@ jobs: flag-name: swift2objc github-token: ${{ secrets.GITHUB_TOKEN }} parallel: true - path-to-lcov: pkgs/swiftgen/swift2objc/coverage/lcov.info + path-to-lcov: pkgs/swift2objc/coverage/lcov.info - name: Upload coverage uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 with: diff --git a/README.md b/README.md index df88a5c312..284111fecf 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ building and bundling. | [objective_c](pkgs/objective_c/) | A library to access Objective C from Flutter that acts as a support library for package:ffigen. | [![pub package](https://img.shields.io/pub/v/objective_c.svg)](https://pub.dev/packages/objective_c) | | [jni](pkgs/jni/) | A library to access JNI from Dart and Flutter that acts as a support library for `package:jnigen`. | [![pub package](https://img.shields.io/pub/v/jni.svg)](https://pub.dev/packages/jni) | | [jnigen](pkgs/jnigen/) | A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine. | [![pub package](https://img.shields.io/pub/v/jnigen.svg)](https://pub.dev/packages/jnigen) | +| [swift2objc](pkgs/swift2objc/) | Generates ObjC compatibility wrappers for Swift APIs. | [![pub package](https://img.shields.io/pub/v/swift2objc.svg)](https://pub.dev/packages/swift2objc) | | [swiftgen](pkgs/swiftgen/) | A Dart bindings generator for Swift. | [![pub package](https://img.shields.io/pub/v/swiftgen.svg)](https://pub.dev/packages/swiftgen) | | [native_assets_builder](pkgs/native_assets_builder/) | This package is the backend that invokes build hooks. | [![pub package](https://img.shields.io/pub/v/native_assets_builder.svg)](https://pub.dev/packages/native_assets_builder) | | [native_assets_cli](pkgs/native_assets_cli/) | A library that contains the argument and file formats for implementing a native assets CLI. | [![pub package](https://img.shields.io/pub/v/native_assets_cli.svg)](https://pub.dev/packages/native_assets_cli) | diff --git a/pkgs/swift2objc/.gitignore b/pkgs/swift2objc/.gitignore new file mode 100644 index 0000000000..e9b915e4b5 --- /dev/null +++ b/pkgs/swift2objc/.gitignore @@ -0,0 +1,45 @@ +# See https://dart.dev/guides/libraries/private-files + +# Files and directories created by pub. +.dart_tool/ +.packages +pubspec.lock +.flutter-plugins +.flutter-plugins-dependencies + +# IDE and debugger files. +.clangd +.gdb_history +.history +.vscode +compile_commands.json + +# Directory created by dartdoc. +# If you don't generate documentation locally you can remove this line. +doc/api/ + +# Avoid committing generated Javascript files: +*.dart.js +*.info.json # Produced by the --dump-info flag. +*.js # When generated by dart2js. Don't specify *.js if your + # project includes source files written in JavaScript. +*.js_ +*.js.deps +*.js.map + +# Generated shared libraries. +*.so +*.so.* +*.dylib +*.dll + +# Directory for quick experiments. +experiments/ + +# Files generated by tests for debugging purposes. +test/debug_generated/* +!test/debug_generated/readme.md +coverage/ + +# Files generated by various OSs. +.DS_Store diff --git a/pkgs/swiftgen/swift2objc/CHANGELOG.md b/pkgs/swift2objc/CHANGELOG.md similarity index 100% rename from pkgs/swiftgen/swift2objc/CHANGELOG.md rename to pkgs/swift2objc/CHANGELOG.md diff --git a/pkgs/swiftgen/swift2objc/LICENSE b/pkgs/swift2objc/LICENSE similarity index 100% rename from pkgs/swiftgen/swift2objc/LICENSE rename to pkgs/swift2objc/LICENSE diff --git a/pkgs/swiftgen/swift2objc/README.md b/pkgs/swift2objc/README.md similarity index 100% rename from pkgs/swiftgen/swift2objc/README.md rename to pkgs/swift2objc/README.md diff --git a/pkgs/swiftgen/swift2objc/analysis_options.yaml b/pkgs/swift2objc/analysis_options.yaml similarity index 100% rename from pkgs/swiftgen/swift2objc/analysis_options.yaml rename to pkgs/swift2objc/analysis_options.yaml diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/compound_declaration.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/compound_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/compound_declaration.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/compound_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/declaration.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/declaration.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/enum_declaration.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/enum_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/enum_declaration.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/enum_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/objc_annotatable.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/objc_annotatable.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/objc_annotatable.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/objc_annotatable.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/parameterizable.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/parameterizable.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/parameterizable.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/parameterizable.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/protocol_conformable.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/protocol_conformable.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/protocol_conformable.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/protocol_conformable.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/type_parameterizable.dart b/pkgs/swift2objc/lib/src/ast/_core/interfaces/type_parameterizable.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/interfaces/type_parameterizable.dart rename to pkgs/swift2objc/lib/src/ast/_core/interfaces/type_parameterizable.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/shared/parameter.dart b/pkgs/swift2objc/lib/src/ast/_core/shared/parameter.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/shared/parameter.dart rename to pkgs/swift2objc/lib/src/ast/_core/shared/parameter.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/_core/shared/referred_type.dart b/pkgs/swift2objc/lib/src/ast/_core/shared/referred_type.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/_core/shared/referred_type.dart rename to pkgs/swift2objc/lib/src/ast/_core/shared/referred_type.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/built_in/built_in_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/built_in/built_in_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/built_in/built_in_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/built_in/built_in_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/compounds/class_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/compounds/class_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/compounds/class_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/compounds/class_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/compounds/protocol_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/compounds/protocol_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/compounds/protocol_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/compounds/protocol_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/compounds/struct_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/compounds/struct_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/compounds/struct_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/compounds/struct_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/enums/associated_value_enum_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/enums/associated_value_enum_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/enums/associated_value_enum_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/enums/associated_value_enum_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/enums/normal_enum_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/enums/normal_enum_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/enums/normal_enum_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/enums/normal_enum_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/enums/raw_value_enum_declaration.dart b/pkgs/swift2objc/lib/src/ast/declarations/enums/raw_value_enum_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/enums/raw_value_enum_declaration.dart rename to pkgs/swift2objc/lib/src/ast/declarations/enums/raw_value_enum_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/ast/declarations/globals/globals.dart b/pkgs/swift2objc/lib/src/ast/declarations/globals/globals.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/ast/declarations/globals/globals.dart rename to pkgs/swift2objc/lib/src/ast/declarations/globals/globals.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/generator/_core/utils.dart b/pkgs/swift2objc/lib/src/generator/_core/utils.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/generator/_core/utils.dart rename to pkgs/swift2objc/lib/src/generator/_core/utils.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/generator/generator.dart b/pkgs/swift2objc/lib/src/generator/generator.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/generator/generator.dart rename to pkgs/swift2objc/lib/src/generator/generator.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/generator/generators/class_generator.dart b/pkgs/swift2objc/lib/src/generator/generators/class_generator.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/generator/generators/class_generator.dart rename to pkgs/swift2objc/lib/src/generator/generators/class_generator.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/_core/json.dart b/pkgs/swift2objc/lib/src/parser/_core/json.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/_core/json.dart rename to pkgs/swift2objc/lib/src/parser/_core/json.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/_core/parsed_symbolgraph.dart b/pkgs/swift2objc/lib/src/parser/_core/parsed_symbolgraph.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/_core/parsed_symbolgraph.dart rename to pkgs/swift2objc/lib/src/parser/_core/parsed_symbolgraph.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/_core/utils.dart b/pkgs/swift2objc/lib/src/parser/_core/utils.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/_core/utils.dart rename to pkgs/swift2objc/lib/src/parser/_core/utils.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/parser.dart b/pkgs/swift2objc/lib/src/parser/parser.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/parser.dart rename to pkgs/swift2objc/lib/src/parser/parser.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_class_decalartion.dart b/pkgs/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_class_decalartion.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_class_decalartion.dart rename to pkgs/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_class_decalartion.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_method_declaration.dart b/pkgs/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_method_declaration.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_method_declaration.dart rename to pkgs/swift2objc/lib/src/parser/parsers/declaration_parsers/parse_method_declaration.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/parsers/parse_declarations.dart b/pkgs/swift2objc/lib/src/parser/parsers/parse_declarations.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/parsers/parse_declarations.dart rename to pkgs/swift2objc/lib/src/parser/parsers/parse_declarations.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/parsers/parse_relations_map.dart b/pkgs/swift2objc/lib/src/parser/parsers/parse_relations_map.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/parsers/parse_relations_map.dart rename to pkgs/swift2objc/lib/src/parser/parsers/parse_relations_map.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/parser/parsers/parse_symbols_map.dart b/pkgs/swift2objc/lib/src/parser/parsers/parse_symbols_map.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/parser/parsers/parse_symbols_map.dart rename to pkgs/swift2objc/lib/src/parser/parsers/parse_symbols_map.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/transformer/_core/unique_namer.dart b/pkgs/swift2objc/lib/src/transformer/_core/unique_namer.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/transformer/_core/unique_namer.dart rename to pkgs/swift2objc/lib/src/transformer/_core/unique_namer.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/transformer/transform.dart b/pkgs/swift2objc/lib/src/transformer/transform.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/transformer/transform.dart rename to pkgs/swift2objc/lib/src/transformer/transform.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/transformer/transformers/transform_class.dart b/pkgs/swift2objc/lib/src/transformer/transformers/transform_class.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/transformer/transformers/transform_class.dart rename to pkgs/swift2objc/lib/src/transformer/transformers/transform_class.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/transformer/transformers/transform_method.dart b/pkgs/swift2objc/lib/src/transformer/transformers/transform_method.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/transformer/transformers/transform_method.dart rename to pkgs/swift2objc/lib/src/transformer/transformers/transform_method.dart diff --git a/pkgs/swiftgen/swift2objc/lib/src/transformer/transformers/transform_referred_type.dart b/pkgs/swift2objc/lib/src/transformer/transformers/transform_referred_type.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/src/transformer/transformers/transform_referred_type.dart rename to pkgs/swift2objc/lib/src/transformer/transformers/transform_referred_type.dart diff --git a/pkgs/swiftgen/swift2objc/lib/swift2objc.dart b/pkgs/swift2objc/lib/swift2objc.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/lib/swift2objc.dart rename to pkgs/swift2objc/lib/swift2objc.dart diff --git a/pkgs/swiftgen/swift2objc/pubspec.yaml b/pkgs/swift2objc/pubspec.yaml similarity index 100% rename from pkgs/swiftgen/swift2objc/pubspec.yaml rename to pkgs/swift2objc/pubspec.yaml diff --git a/pkgs/swiftgen/swift2objc/test/integration/classes_and_methods_input.swift b/pkgs/swift2objc/test/integration/classes_and_methods_input.swift similarity index 100% rename from pkgs/swiftgen/swift2objc/test/integration/classes_and_methods_input.swift rename to pkgs/swift2objc/test/integration/classes_and_methods_input.swift diff --git a/pkgs/swiftgen/swift2objc/test/integration/classes_and_methods_output.swift b/pkgs/swift2objc/test/integration/classes_and_methods_output.swift similarity index 100% rename from pkgs/swiftgen/swift2objc/test/integration/classes_and_methods_output.swift rename to pkgs/swift2objc/test/integration/classes_and_methods_output.swift diff --git a/pkgs/swiftgen/swift2objc/test/integration/integration_test.dart b/pkgs/swift2objc/test/integration/integration_test.dart similarity index 100% rename from pkgs/swiftgen/swift2objc/test/integration/integration_test.dart rename to pkgs/swift2objc/test/integration/integration_test.dart diff --git a/pkgs/swiftgen/swift2objc/test/integration/temp/.gitignore b/pkgs/swift2objc/test/integration/temp/.gitignore similarity index 100% rename from pkgs/swiftgen/swift2objc/test/integration/temp/.gitignore rename to pkgs/swift2objc/test/integration/temp/.gitignore