sbt-license-report icon indicating copy to clipboard operation
sbt-license-report copied to clipboard

Ability to specify license information for unmanaged dependencies

Open stevedlawrence opened this issue 10 years ago • 2 comments

Right now, it looks like license information only comes from managed dependencies via Ivy. This means that any unmanaged dependencies are not part of the report. It would be nice if there was an easy way to specify the license information in the sbt configuration for unmanaged dependencies so the license report could be complete.

stevedlawrence avatar Dec 04 '14 17:12 stevedlawrence

+1 For this.

metasim avatar Aug 11 '15 14:08 metasim

@stevedlawrence Here's one approach to injecting non-managed licenses:

updateLicenses := {
  val report = updateLicenses.value
  val mit = LicenseInfo(LicenseCategory.MIT, "MIT License", "http://opensource.org/licenses/MIT")
  val configs = Set("runtime")
  val extras = Seq(
    DepLicense(DepModuleInfo("javascript", "angular", "1.3.0"), mit, configs),
    DepLicense(DepModuleInfo("javascript", "amsul-datepicker", "3.5.6"), mit, configs)
  )
  report.copy(licenses = report.licenses ++ extras)
}

metasim avatar Aug 11 '15 18:08 metasim