From: PJ Fanning Date: Mon, 28 Feb 2022 14:15:40 +0000 (+0000) Subject: add license plugin X-Git-Tag: REL_5_2_2~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cd1c603aaa0cd55c8eb7e70410b233919f855a76;p=poi.git add license plugin git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898477 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build.gradle b/build.gradle index 132084ca69..a6b2093166 100644 --- a/build.gradle +++ b/build.gradle @@ -40,12 +40,39 @@ plugins { id('org.nosphere.apache.rat') version '0.7.0' id 'distribution' id "com.github.spotbugs" version "4.8.0" + id 'com.github.jk1.dependency-license-report' version '2.0' } repositories { mavenCentral() } +import com.github.jk1.license.render.* +import com.github.jk1.license.importer.* + +licenseReport { + + // Select projects to examine for dependencies. + // Defaults to current project and all its subprojects + projects = [project] + project.subprojects + + // Adjust the configurations to fetch dependencies, e.g. for Android projects. Default is 'runtimeClasspath' + configurations = ['runtimeClasspath'] + // Use 'ALL' to dynamically resolve all configurations: + // configurations = ALL + + // Don't include artifacts of project's own group into the report + excludeOwnGroup = true + + // Don't exclude bom dependencies. + // If set to true, then all boms will be excluded from the report + excludeBoms = false + + // Set custom report renderer, implementing ReportRenderer. + // Yes, you can write your own to support any format necessary. + renderers = [new XmlReportRenderer('third-party-libs.xml', 'Back-End Libraries')] +} + // Only add the plugin for Sonar if enabled if (project.hasProperty('enableSonar')) { println 'Enabling Sonar support'