licensee icon indicating copy to clipboard operation
licensee copied to clipboard

Extract SPDX library parsing to a 3rd party library

Open klu2 opened this issue 3 years ago • 1 comments

This pull request removes SPDX parsing from this code-base and replaces it with https://github.com/cloudflightio/spdx-catalog. In order to be fully compatible here, I've adapted the spdx-catalog as follows:

  • replaced Jackson with Kotlin Serialization (same library version as has been used here)
  • downgrade to Kotlin 1.5 (compatibility mode 1.3), just like this library is implemented
  • implemented logic to handle with multiple URLs
  • it also comes with a solution for https://github.com/cashapp/licensee/issues/28 by also taking the extracted name into consideration when multiple urls do match, see https://github.com/cloudflightio/spdx-catalog/blob/main/src/test/kotlin/io/cloudflight/license/spdx/SpdxLicensesTest.kt#L76

Also updated to SPDX catalog to version 3.16 (3.12 was used previously), and you don't need to update that manually any more.

I've spent quite some time to exactly take over the logic from your plugin in order to be able to join forces here, I hope you like it

klu2 avatar Mar 29 '22 22:03 klu2

Thanks for writing this up and the work. I will evaluate it soon. Been busy at work / on vacation!

JakeWharton avatar May 24 '22 02:05 JakeWharton