Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

chore: automate NOTICE generation #132

Merged
merged 7 commits into from
Sep 21, 2021
Merged

chore: automate NOTICE generation #132

merged 7 commits into from
Sep 21, 2021

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Sep 17, 2021

Details

In mid-April, ClearlyDefined (the backend Component Governance uses to identify license information of components) added support for dependencies that come from maven.google.com. That means that we no longer have to manually update our NOTICE.html file to accurately attribute Google's dependencies; we can switch to automatically generating the NOTICE files like we do in our other repos.

This PR implements:

  • Removing the manually managed NOTICE.html file
  • Removing the PR build check that it matches the lockfile
  • Adding a release build task to generate the NOTICE file automatically
  • Moving the task to validate that it matches the lockfile to right after generation (as a safety check that the NOTICE generator is configured correctly)
  • Updated error output from the validation task accordingly
  • Adds a new check (to both release and PR builds) that the lockfile is up to date (this is more important to do continuously now, since its accuracy affects NOTICE generation accuracy)

Example release build with a NOTICE validation failure due to intentionally checking incorrect boxes in NOTICE config in component governance: #20210918.2

Example passing release build with generated NOTICE file: #20210918.4

Motivation

Automates a confusing manual process

Context

n/a

Pull request checklist

  • [n/a] Addresses an existing issue: #0000
  • [n/a] Added/updated relevant unit test(s)
  • Ran ./gradlew fastpass from AccessibilityInsightsForAndroidService
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:).

@dbjorge dbjorge marked this pull request as ready for review September 18, 2021 01:17
@dbjorge dbjorge requested a review from a team as a code owner September 18, 2021 01:17
Copy link
Collaborator

@DaveTryon DaveTryon left a comment

Choose a reason for hiding this comment

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

Great stuff! Thanks for adding this

@dbjorge dbjorge merged commit e8009ee into main Sep 21, 2021
@dbjorge dbjorge deleted the automate-notice-generation branch September 21, 2021 18:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants