Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bc11097

Browse files
committed
Get licenses check deps from gclient rather than pub
1 parent f3847fe commit bc11097

File tree

6 files changed

+48
-9
lines changed

6 files changed

+48
-9
lines changed

DEPS

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,14 @@ deps = {
394394
'src/third_party/abseil-cpp':
395395
Var('chromium_git') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '2d8c1340f0350828f1287c4eaeebefcf317bcfc9',
396396

397+
# Dart packages
398+
'src/third_party/pkg/archive':
399+
Var('github_git') + '/brendan-duncan/archive.git' + '@' + '3.1.2',
400+
397401
'src/third_party/pkg/when':
398-
Var('dart_git') + '/when.git' + '@' + '0.2.0',
402+
Var('dart_git') + '/when.git' + '@' + '0.2.0',
399403

400-
'src/third_party/android_tools/ndk': {
404+
'src/third_party/android_tools/ndk': {
401405
'packages': [
402406
{
403407
'package': 'flutter/android/ndk/${{platform}}',

ci/licenses.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ dart --version
6262
# Runs in a subshell.
6363
function collect_licenses() (
6464
cd "$SRC_DIR/flutter/tools/licenses"
65-
pub get
6665
dart --enable-asserts lib/main.dart \
6766
--src ../../.. \
6867
--out ../../../out/license_script_output \

ci/licenses_golden/tool_signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Signature: d165688a88dd53153d8e32bd26d3fa6d
1+
Signature: dd0af3be798528c3303ec68043c4785c
22

tools/licenses/lib/main.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,11 @@ class _RepositoryLibWebpDirectory extends _RepositoryDirectory {
16621662
class _RepositoryPkgDirectory extends _RepositoryDirectory {
16631663
_RepositoryPkgDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io);
16641664

1665+
@override
1666+
bool shouldRecurse(fs.IoNode entry) {
1667+
return entry.name != 'archive'; // contains nothing that ends up in the binary executable
1668+
}
1669+
16651670
@override
16661671
_RepositoryDirectory createSubdirectory(fs.Directory entry) {
16671672
if (entry.name == 'when')

tools/licenses/pubspec.yaml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
15
name: licenses
6+
publish_to: none
27
environment:
38
sdk: '>=2.8.0 <3.0.0'
49

10+
# Do not add any dependencies that require more than what is provided in
11+
# //third_party.pkg, //third_party/dart/pkg, or
12+
# //third_party/dart/third_party/pkg. In particular, package:test is not usable
13+
# here.
14+
15+
# If you do add packages here, make sure you can run `pub get --offline`, and
16+
# check the .packages and .package_config to make sure all the paths are
17+
# relative to this directory into //third_party/dart
18+
519
dependencies:
6-
archive: ^2.0.4
7-
args: 1.5.0
8-
crypto: ^2.0.2+1
9-
meta: ^1.1.6
10-
path: ^1.3.0
20+
archive: any
21+
args: any
22+
crypto: any
23+
meta: any
24+
path: any
25+
26+
dependency_overrides:
27+
archive:
28+
path: ../../../third_party/pkg/archive
29+
args:
30+
path: ../../../third_party/dart/third_party/pkg/args
31+
collection:
32+
path: ../../../third_party/dart/third_party/pkg/collection
33+
crypto:
34+
path: ../../../third_party/dart/third_party/pkg/crypto
35+
meta:
36+
path: ../../../third_party/dart/pkg/meta
37+
path:
38+
path: ../../../third_party/dart/third_party/pkg/path
39+
typed_data:
40+
path: ../../../third_party/dart/third_party/pkg/typed_data

tools/pub_get_offline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
ALL_PACKAGES = [
1818
os.path.join("src", "flutter", "flutter_frontend_server"),
1919
os.path.join("src", "flutter", "tools", "const_finder"),
20+
os.path.join("src", "flutter", "tools", "licenses"),
2021
]
2122

2223

0 commit comments

Comments
 (0)