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

[flutter_tools] include LICENSE files as build dependencies #50945

Merged
merged 3 commits into from Feb 20, 2020

Conversation

jonahwilliams
Copy link
Member

Description

have the AssetManifest track LICENSE files as input dependencies using a refactored LicenseCollector. Surface these dependencies as depfile inputs to ensure the bundle is rebuilt if a LICENSE file changes.

Adds note about current bug in the license processing, and includes tests for some of the current license behavior.

Fixes #27720

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 17, 2020
@jonahwilliams
Copy link
Member Author

Note: this needs a corresponding change in google3 due to additionalDependencies field added to the AssetManifest

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (licenseText == null) {
packageNames = <String>[packageName];
licenseText = rawLicense;
final File file = _fileSystem.file(package.resolve('../LICENSE'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this patch, but this seems like something we should delegate to pub.

@jmagman jmagman added this to Awaiting triage in Tools - team support review via automation Feb 18, 2020
@jonahwilliams
Copy link
Member Author

Going to avoid landing this until I update other implementations

@jonahwilliams jonahwilliams moved this from Awaiting triage to Engineer reviewed in Tools - team support review Feb 18, 2020
@jonahwilliams
Copy link
Member Author

Upstream change has landed, this is safe to submit now

@fluttergithubbot fluttergithubbot merged commit 6d0b1ef into flutter:master Feb 20, 2020
@jonahwilliams jonahwilliams deleted the add_license_deps branch February 20, 2020 03:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - team support review
  
Engineer reviewed
Development

Successfully merging this pull request may close these issues.

"flutter build apk" doesn't always update LICENSE file
4 participants