add license plugin

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898477 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-02-28 14:15:40 +00:00
parent 53300f5c84
commit cd1c603aaa
1 changed files with 27 additions and 0 deletions

View File

@ -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'