Skip to content

Consensys/license-reporter

Repository files navigation

License Reporter

A custom license renderer used by Consensys Teku and Web3Signer projects for the Gradle License Report plugin.

The renderer GroupedLicenseHtmlRenderer generates a simple HTML which groups dependencies under their license.

In the build logs, it will report the dependencies with no license information or multiple licenses. To avoid reporting such dependencies in multiple license groups, they can be added in the allowedLicensesFile by adding overrideLicenses section.

...
"overrideLicenses" : [
    {
      "moduleName": "com.github.fge",
      "moduleLicense": "Apache License, Version 2.0"
    },
      ...
    {
      "moduleName": "io.libp2p:jvm-libp2p-minimal",
      "moduleLicense": "Apache License, Version 2.0",
      "moduleLicenseUrl": "https://github.com/libp2p/jvm-libp2p/blob/develop/LICENSE-APACHE"
    },

Usage

  • Add dependency in buildscript
buildscript {
  dependencies {
    classpath 'io.consensys.protocols:license-reporter:<version>'
  }
}
  • Add GroupedLicenseHtmlRenderer in list of renderers:
licenseReport {
    configurations = ['runtimeClasspath']
    outputDir = "${buildDir}/reports/licenses"
    projects = [project] + project.subprojects.findAll {it.name != "errorprone-checks" }
    excludes = ['org.junit:junit-bom']
    allowedLicensesFile = new File("${rootDir}/gradle/license-report-config/allowed-licenses.json")
    filters = [new LicenseBundleNormalizer()]
    renderers = [new io.consensys.protocols.license.reporter.GroupedLicenseHtmlRenderer()]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages