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

Create a Kotlin script to extract the licenses for the Maven dependencies #3287

Closed
prayutsu opened this issue Jun 11, 2021 · 0 comments · Fixed by #3450
Closed

Create a Kotlin script to extract the licenses for the Maven dependencies #3287

prayutsu opened this issue Jun 11, 2021 · 0 comments · Fixed by #3450
Assignees
Labels
Priority: Essential This work item must be completed for its milestone. Type: Task A single task of work corresponding to a greater milestone. Generally corresponds to a single PR. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@prayutsu
Copy link
Contributor

Create a Kotlin script that will extract the license texts for all the Maven dependencies and also generate resource XML files that will be used to display the actual license texts.

Target PR date: 2021-06-30
Target completion date: 2021-07-06

@prayutsu prayutsu added Where: Settings Priority: Essential This work item must be completed for its milestone. Type: Task A single task of work corresponding to a greater milestone. Generally corresponds to a single PR. labels Jun 11, 2021
@prayutsu prayutsu added this to the GSoC 2021.6: Milestone 1 milestone Jun 11, 2021
@prayutsu prayutsu self-assigned this Jun 11, 2021
BenHenning pushed a commit that referenced this issue Aug 10, 2021
* Generate maven_install.json

* Add fail_if_repin_required attribute

* Update rules_jvm_external version in versions.bzl and use fail_if_repin_required attribute in maven_install()

* Fix bazel lint error.

* Update code ownership for maven_install.json

* Fix #3290: Add support for generic regex pattern matching

* Apply review suggestions for proto location

* Delete main directory

* Implment script logic and tests

* CI setup part 1

* syntax fix in yaml file

* import nits in dummy file

* Use regex patterns from script in script test

* Make PR suggestions into effect

* Make PR suggestions into effect

* Make PR suggestions into effect

* Improve naming of script_assets variables

* Make PR suggestions into effect

* Create maven_dependencies_list.kts and complete the parsing of the maven_install.json

* Make PR suggestions

* Make PR suggestions

* Improve naming in script and add KDocs for data classes.

* Add EOF for all classes.

* Change data structure to store backup dependencies.

* Revamp testing approach

* nit fixes

* Add maven re-pin command.

* Add BUILD.bazel file and Test file for script.creatre-script-to-compile-list-of-maven-dependencies

* Fix test build error.

* Improve code.

* Make nit suggestions

* Try changing location of maven_install.json

* Convert .kts to .kt

* Save work.

* Rename data classes.

* Remove kscript.

* Fix lints.

* Apply review suggestions on PR

* Refactor PR as per feedback recieved

* Implement review suggestions

* Set different output_base for bazel query command

* nits

* Nit fixes

* nit fix

* Change maven_install_json attribute

* Move maven_install.json to third_party

* Remove maven_install code ownership from CODEOWNERS

* Save changes.

* remove class

* Fix errors

* Review suggestions part 1

* Implement review suggestions part 2

* Fix broken script

* nit fixes

* update static_checks

* add test to repository file

* nit fix

* nit fix

* Validate all Links.

* nit fix

* Implement review suggestions

* bazel files nit fix

* Introduce a library for the regex assets

* Change structure of the script.

* Make directory structure same as that of #3374

* diable ktlint max-line-length

* disable ktlint-max-line

* disable ktlint max-length

* save changes.

* commit

* nit fix

* Add bazel pipeline to app module

* save.

* save.

* save.

* save.

* save.

* save.

* nit fix

* fix broken script

* Fix bug of printing enum values in output.

* Fix bug of printing enum values in output.

* Apply review suggestions

* ktlint fix

* nit fix

* Remove script constants

* nit fix

* Make script to call out the dependencies and licenses for which manual work needs to be completed.

* add todo

* Complete first script

* Add first script to scripts package

* Remove unwanted files

* Remove extra files and fix formatting

* Fix lints.

* Remove unnecessary lines of code

* Add comments for proto

* Add test file.

* Fix lints.

* Add second script

* Remove unwanted dependencies.

* Add suggested changes.

* Add test file

* nit fixes

* Fix lint.

* add testOnly

* Add pipeline to print actual dependencies' names

* Fix nits

* Add suggested changes.

* Add suggested changes

* add function to write license texts.

* Update text proto

* Update textproto

* Update maven_dependencies.textproto

* Update Licenses writing function

* Write license name array

* Always force https over http

* Always force https over http

* Correct origin type

* Complete script

* Fix lints.

* Add support for escape characters.

* Fix nits

* Use common/BazelClient

* Fix lints

* Save progress

* create test_maven_install.json

* Add test cases

* Create function to add license

* Add more test cases

* Fix lints

* Correct typo

* Add one more test case

* Restructure script

* Break script in two parts

* Add DependencyListsProvider

* Add DependencyListsProvider

* correct query command

* Correct structure of the script

* Correct structure of the script

* Fix not suggestions

* Use

* Add test file for NetworkAndBazelUtilsImpl.kt

* Delete unwanted files

* Delete unwanted files

* Add library for GenerateLicenseTexts.kt

* Add suggested changes

* Add data classes to exemptions.textproto

* Remove commented out code

* Add KDocs for helper functions in GenerateLicenseTextsTest.kt

* Remove unused variables

* Delete unwanted proto file

* Use createCDATASection instead of manually constructing it

* Add suggested changes

* Add suggested changes

* Correct test case

* Fix nit

* Add changes as per the UI

* Fix script to preserve text format of licenses

* Remove extra lines of code

* Add KDoc

* Add suggested changes

* Omit version from the dependency names in xml

* Add suggested changes

* Add suggested changes

* Correct KDoc

* Correct file paths in exemptions file

* Revert unwanted chang.

* Refactor 'data_lib' to 'data'

* Add suggested changes

* Fix lints

* Correct deps in BUILD.bazel

* Correct deps in BUILD.bazel

* Nit fix

* Nit fix

* Nit fix

* Nit fix

* Use .map

Co-authored-by: Sparsh1212 <[email protected]>
@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Essential This work item must be completed for its milestone. Type: Task A single task of work corresponding to a greater milestone. Generally corresponds to a single PR. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

Successfully merging a pull request may close this issue.

2 participants