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

Fix #3287: Introduce Kotlin script to extract license texts #3450

Merged
merged 215 commits into from
Aug 10, 2021

Conversation

prayutsu
Copy link
Contributor

@prayutsu prayutsu commented Jul 9, 2021

Explanation

Fixes #3287:
Created a Kotlin script that extracts the license texts for the third-party maven dependencies.

To run the script, run the following command -

bazel run //scripts:generate_license_texts -- $(pwd)/app/src/main/res/values scripts/assets/maven_dependencies.pb

As an output of the script, 5 files would get generated (resource XML files) that will be used to finally show these licenses in the UI. Note that these files should never be directly checked into the codebase.
They will only be generated by the maintainers at the time of preparing for a release.

Screenshot of passing test cases-
Screenshot from 2021-07-21 16-12-36

Files generated by the script can be seen here -
https://gist.github.com/prayutsu/7693dabae98370ca000d959efaff0058

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

prayutsu and others added 30 commits June 7, 2021 11:33
@BenHenning BenHenning assigned prayutsu and unassigned BenHenning Aug 5, 2021
@prayutsu prayutsu assigned BenHenning and unassigned prayutsu Aug 5, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @prayutsu. Checked the changes & fully reviewed the tests. PTAL.

@BenHenning BenHenning assigned prayutsu and unassigned BenHenning Aug 9, 2021
@prayutsu prayutsu assigned BenHenning and unassigned prayutsu Aug 10, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @prayutsu. LGTM!

@BenHenning BenHenning merged commit ee42f1d into develop Aug 10, 2021
GSoC 2021.6: Support for displaying copyright licenses automation moved this from In progress to Done Aug 10, 2021
@BenHenning BenHenning deleted the introduce-second-script-to-extract-license-texts branch August 10, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Create a Kotlin script to extract the licenses for the Maven dependencies
6 participants