diff options
author | Zipeng WU <zipeng.wu@sonarsource.com> | 2021-10-22 15:40:57 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-10-26 20:03:36 +0000 |
commit | 85e535637a69b83d8a05932521ae2813f5d516b8 (patch) | |
tree | fbb772a7ffcc570e0c9dc9149a8ed7e099635380 /sonar-application/build.gradle | |
parent | 492799905a46083761ae81de3ba3cc2a0b047dc1 (diff) | |
download | sonarqube-85e535637a69b83d8a05932521ae2813f5d516b8.tar.gz sonarqube-85e535637a69b83d8a05932521ae2813f5d516b8.zip |
SONAR-15485 Generate license info in community distribution
Diffstat (limited to 'sonar-application/build.gradle')
-rw-r--r-- | sonar-application/build.gradle | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle index d9ec42c1f1d..578835e42da 100644 --- a/sonar-application/build.gradle +++ b/sonar-application/build.gradle @@ -1,6 +1,7 @@ import org.apache.tools.ant.filters.ReplaceTokens plugins { + id "com.github.hierynomus.license-report" id "com.github.johnrengelman.shadow" id "de.undercouch.download" } @@ -29,6 +30,8 @@ configurations { bundledPlugin { transitive = false } + + appLicenses.extendsFrom(compile, web, scanner, jsw, jdbc_mssql, jdbc_postgresql, jdbc_h2) } jar.enabled = false @@ -90,11 +93,18 @@ task downloadElasticSearch(type: Download) { finalizedBy verifyElasticSearchDownload } -task zip(type: Zip, dependsOn: [configurations.compileClasspath, downloadElasticSearch, verifyElasticSearchDownload]) { +downloadLicenses { + dependencyConfiguration = 'appLicenses' +} + +task zip(type: Zip, dependsOn: [configurations.compileClasspath, tasks.downloadLicenses, downloadElasticSearch, verifyElasticSearchDownload]) { duplicatesStrategy DuplicatesStrategy.EXCLUDE def archiveDir = "sonarqube-$project.version" into("${archiveDir}/") { + from(tasks.downloadLicenses.outputs) { + include 'dependency-license.json' + } from(file('src/main/assembly')) { exclude 'conf/sonar.properties' exclude 'conf/wrapper.conf' |