diff --git a/packages/flutter_tools/BUILD.gn b/packages/flutter_tools/BUILD.gn index ab51f886afe..6af68918d3c 100644 --- a/packages/flutter_tools/BUILD.gn +++ b/packages/flutter_tools/BUILD.gn @@ -57,6 +57,7 @@ dart_library("flutter_tools") { dart_tool("fuchsia_builder") { main_dart = "bin/fuchsia_builder.dart" + package_root = "fuchsia_entrypoint_shim/fuchsia_builder" disable_analysis = true @@ -67,6 +68,7 @@ dart_tool("fuchsia_builder") { dart_tool("fuchsia_asset_builder") { main_dart = "bin/fuchsia_asset_builder.dart" + package_root = "fuchsia_entrypoint_shim/fuchsia_asset_builder" disable_analysis = true @@ -153,6 +155,7 @@ dart_tool("fuchsia_asset_builder") { dart_tool("fuchsia_tester") { main_dart = "bin/fuchsia_tester.dart" + package_root = "fuchsia_entrypoint_shim/tester" disable_analysis = true @@ -248,6 +251,7 @@ dart_tool("fuchsia_tester") { dart_tool("fuchsia_attach") { package_name = "fuchsia_attach" main_dart = "bin/fuchsia_attach.dart" + package_root = "fuchsia_entrypoint_shim/attach" # Can be left empty as analysis is disabled. sources = [] diff --git a/packages/flutter_tools/fuchsia_entrypoint_shim/README.md b/packages/flutter_tools/fuchsia_entrypoint_shim/README.md new file mode 100644 index 00000000000..778c5456c47 --- /dev/null +++ b/packages/flutter_tools/fuchsia_entrypoint_shim/README.md @@ -0,0 +1,21 @@ +This directory serves as a placeholder directory for the package roots of +various fuchsia tools which use the flutter_tools library. + +This is required to provide a workaround for the fuchsia build system. +When this directory is not present the various tools specified in the +`dart_tool` directives in the flutter_tools/BUILD.gn file will end up +having the same package root entry written in the .packages file. This +causes the build to fail because the dart compiler has a requirement that +libraries must have a unique package uri. By specifying a package root which +is a subdirectory of this directory for these tools we avoid having the build +system create duplicate package roots for the generated libraries for these +tools. + +Note that we cannot move the location of the main files for these tools because +the paths are hard coded in the fuchsia tree. + + +Tracking Bugs: +- fxbug.dev/51373 (move flutter_tools/BUILD.gn to fuchsia repo) +- fxbug.dev/51375 (do not refence fuchsia_tester.dart directly) +- fxbug.dev/51375 (remove the fuchsia_entrypoint_shim directory) diff --git a/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_asset_builder/pubspec.yaml b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_asset_builder/pubspec.yaml new file mode 100644 index 00000000000..ec58032ed74 --- /dev/null +++ b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_asset_builder/pubspec.yaml @@ -0,0 +1,14 @@ +name: flutter_asset_builder +description: Tools for building Flutter applications +homepage: https://flutter.dev +author: Flutter Authors + +environment: + # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. + sdk: ">=2.7.0 <3.0.0" + +dartdoc: + # Exclude this package from the hosted API docs. + nodoc: true + +# PUBSPEC CHECKSUM: 0000 diff --git a/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_attach/pubspec.yaml b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_attach/pubspec.yaml new file mode 100644 index 00000000000..9a1e016bd35 --- /dev/null +++ b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_attach/pubspec.yaml @@ -0,0 +1,14 @@ +name: flutter_attach +description: Tools for building Flutter applications +homepage: https://flutter.dev +author: Flutter Authors + +environment: + # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. + sdk: ">=2.7.0 <3.0.0" + +dartdoc: + # Exclude this package from the hosted API docs. + nodoc: true + +# PUBSPEC CHECKSUM: 0000 diff --git a/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_builder/pubspec.yaml b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_builder/pubspec.yaml new file mode 100644 index 00000000000..3f0a07c2944 --- /dev/null +++ b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_builder/pubspec.yaml @@ -0,0 +1,14 @@ +name: flutter_builder +description: Tools for building Flutter applications +homepage: https://flutter.dev +author: Flutter Authors + +environment: + # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. + sdk: ">=2.7.0 <3.0.0" + +dartdoc: + # Exclude this package from the hosted API docs. + nodoc: true + +# PUBSPEC CHECKSUM: 0000 diff --git a/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_tester/pubspec.yaml b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_tester/pubspec.yaml new file mode 100644 index 00000000000..609ba8a2a0a --- /dev/null +++ b/packages/flutter_tools/fuchsia_entrypoint_shim/fuchsia_tester/pubspec.yaml @@ -0,0 +1,14 @@ +name: flutter_tester +description: Tools for building Flutter applications +homepage: https://flutter.dev +author: Flutter Authors + +environment: + # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. + sdk: ">=2.7.0 <3.0.0" + +dartdoc: + # Exclude this package from the hosted API docs. + nodoc: true + +# PUBSPEC CHECKSUM: 0000