Browse Source

SONAR-15485 Generate license info in community distribution

tags/9.2.0.49834
Zipeng WU 2 years ago
parent
commit
85e535637a
2 changed files with 12 additions and 1 deletions
  1. 1
    0
      build.gradle
  2. 11
    1
      sonar-application/build.gradle

+ 1
- 0
build.gradle View File

@@ -2,6 +2,7 @@ plugins {
// Ordered alphabeticly
id 'com.github.ben-manes.versions' version '0.33.0'
id 'com.github.hierynomus.license' version '0.15.0'
id "com.github.hierynomus.license-report" version"0.15.0" apply false
id 'com.github.johnrengelman.shadow' version '5.2.0' apply false
id 'com.google.protobuf' version '0.8.13' apply false
id 'com.jfrog.artifactory' version '4.21.0'

+ 11
- 1
sonar-application/build.gradle View File

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

Loading…
Cancel
Save