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

Added gradle task to generate THIRD-PARTY License report #621

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

asifsmohammed
Copy link
Collaborator

Signed-off-by: Asif Sohail Mohammed [email protected]

Description

  • Added gradle task to generate THIRD-PARTY-NOTICES.txt
  • Added gradle task to copy it from build to root directory manually

Issues Resolved

Resolves #615

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@asifsmohammed asifsmohammed requested a review from a team as a code owner November 17, 2021 20:59
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #621 (648e392) into main (169365c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #621   +/-   ##
=========================================
  Coverage     91.58%   91.58%           
  Complexity      568      568           
=========================================
  Files            72       72           
  Lines          1747     1747           
  Branches        145      145           
=========================================
  Hits           1600     1600           
  Misses          113      113           
  Partials         34       34           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 169365c...648e392. Read the comment docs.

build.gradle Outdated
renderers = new TextReportRenderer()
}

task copyThirdParyReport(type: Copy) {
Copy link
Member

Choose a reason for hiding this comment

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

The plugin should be creating a large text file which has all the dependencies. That one file should be the one that should overwrite the THIRD-PARTY file. This is copying all the .txt files. It should probably copy one specific file to the THIRD-PARTY file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I was not sure whether to replace it or create a new one.

build.gradle Outdated
renderers = new TextReportRenderer()
}

task copyThirdParyReport(type: Copy) {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest a different name like generateThirdPartyReport. This task also needs to depend on the task from the dependency-license-report plugin. Otherwise, a developer will need to run two tasks.

include '*.txt'
rename 'THIRD-PARTY-NOTICES.txt', 'THIRD-PARTY'
rename 'THIRD-PARTY-NOTICES.txt', 'THIRD-PARTY'
Copy link
Member

Choose a reason for hiding this comment

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

Is this a duplicate renaming?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My bad

build.gradle Outdated
from 'build/reports/dependency-license/'
into '.'
include '*.txt'
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to only copy the file that is needed. Otherwise, if the plugin changes to output multiple files they will end up in the root. This could end up being confusing.

Can this line just be?

include 'THIRD-PARTY-NOTICES.txt'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes

@asifsmohammed asifsmohammed merged commit 90eba7b into opensearch-project:main Nov 18, 2021
dapowers87 pushed a commit to dapowers87/data-prepper that referenced this pull request Nov 18, 2021
…project#621)

* Added gradle task to generate THIRD-PARTY License report

Signed-off-by: Asif Sohail Mohammed <[email protected]>

Co-authored-by: Asif Sohail Mohammed <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Gradle task to generate the THIRD-PARTY file
4 participants