diff --git a/DEPS b/DEPS index 547629e1163bf..a3c0441a4eff0 100644 --- a/DEPS +++ b/DEPS @@ -394,10 +394,14 @@ deps = { 'src/third_party/abseil-cpp': Var('chromium_git') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '2d8c1340f0350828f1287c4eaeebefcf317bcfc9', + # Dart packages + 'src/third_party/pkg/archive': + Var('github_git') + '/brendan-duncan/archive.git' + '@' + '3.1.2', + 'src/third_party/pkg/when': - Var('dart_git') + '/when.git' + '@' + '0.2.0', + Var('dart_git') + '/when.git' + '@' + '0.2.0', - 'src/third_party/android_tools/ndk': { + 'src/third_party/android_tools/ndk': { 'packages': [ { 'package': 'flutter/android/ndk/${{platform}}', diff --git a/ci/licenses.sh b/ci/licenses.sh index 7987610603b49..15efdd80ca367 100755 --- a/ci/licenses.sh +++ b/ci/licenses.sh @@ -62,7 +62,6 @@ dart --version # Runs in a subshell. function collect_licenses() ( cd "$SRC_DIR/flutter/tools/licenses" - pub get dart --enable-asserts lib/main.dart \ --src ../../.. \ --out ../../../out/license_script_output \ diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index 97eff8f2a2a7c..5c6d3ec7db051 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: d165688a88dd53153d8e32bd26d3fa6d +Signature: dd0af3be798528c3303ec68043c4785c diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index 7b8bf8671f0de..937a8db7955c0 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -1662,6 +1662,11 @@ class _RepositoryLibWebpDirectory extends _RepositoryDirectory { class _RepositoryPkgDirectory extends _RepositoryDirectory { _RepositoryPkgDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io); + @override + bool shouldRecurse(fs.IoNode entry) { + return entry.name != 'archive'; // contains nothing that ends up in the binary executable + } + @override _RepositoryDirectory createSubdirectory(fs.Directory entry) { if (entry.name == 'when') diff --git a/tools/licenses/pubspec.yaml b/tools/licenses/pubspec.yaml index 8d517ee3e1c70..66f934a148b52 100644 --- a/tools/licenses/pubspec.yaml +++ b/tools/licenses/pubspec.yaml @@ -1,10 +1,40 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + name: licenses +publish_to: none environment: sdk: '>=2.8.0 <3.0.0' +# Do not add any dependencies that require more than what is provided in +# //third_party.pkg, //third_party/dart/pkg, or +# //third_party/dart/third_party/pkg. In particular, package:test is not usable +# here. + +# If you do add packages here, make sure you can run `pub get --offline`, and +# check the .packages and .package_config to make sure all the paths are +# relative to this directory into //third_party/dart + dependencies: - archive: ^2.0.4 - args: 1.5.0 - crypto: ^2.0.2+1 - meta: ^1.1.6 - path: ^1.3.0 + archive: any + args: any + crypto: any + meta: any + path: any + +dependency_overrides: + archive: + path: ../../../third_party/pkg/archive + args: + path: ../../../third_party/dart/third_party/pkg/args + collection: + path: ../../../third_party/dart/third_party/pkg/collection + crypto: + path: ../../../third_party/dart/third_party/pkg/crypto + meta: + path: ../../../third_party/dart/pkg/meta + path: + path: ../../../third_party/dart/third_party/pkg/path + typed_data: + path: ../../../third_party/dart/third_party/pkg/typed_data diff --git a/tools/pub_get_offline.py b/tools/pub_get_offline.py index a0ef4b23f7705..59b2f8de3b4e1 100644 --- a/tools/pub_get_offline.py +++ b/tools/pub_get_offline.py @@ -17,6 +17,7 @@ ALL_PACKAGES = [ os.path.join("src", "flutter", "flutter_frontend_server"), os.path.join("src", "flutter", "tools", "const_finder"), + os.path.join("src", "flutter", "tools", "licenses"), ]