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

// Ordered alphabeticly // Ordered alphabeticly
id 'com.github.ben-manes.versions' version '0.33.0' id 'com.github.ben-manes.versions' version '0.33.0'
id 'com.github.hierynomus.license' version '0.15.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.github.johnrengelman.shadow' version '5.2.0' apply false
id 'com.google.protobuf' version '0.8.13' apply false id 'com.google.protobuf' version '0.8.13' apply false
id 'com.jfrog.artifactory' version '4.21.0' id 'com.jfrog.artifactory' version '4.21.0'

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

import org.apache.tools.ant.filters.ReplaceTokens import org.apache.tools.ant.filters.ReplaceTokens


plugins { plugins {
id "com.github.hierynomus.license-report"
id "com.github.johnrengelman.shadow" id "com.github.johnrengelman.shadow"
id "de.undercouch.download" id "de.undercouch.download"
} }
bundledPlugin { bundledPlugin {
transitive = false transitive = false
} }

appLicenses.extendsFrom(compile, web, scanner, jsw, jdbc_mssql, jdbc_postgresql, jdbc_h2)
} }


jar.enabled = false jar.enabled = false
finalizedBy verifyElasticSearchDownload 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 duplicatesStrategy DuplicatesStrategy.EXCLUDE
def archiveDir = "sonarqube-$project.version" def archiveDir = "sonarqube-$project.version"


into("${archiveDir}/") { into("${archiveDir}/") {
from(tasks.downloadLicenses.outputs) {
include 'dependency-license.json'
}
from(file('src/main/assembly')) { from(file('src/main/assembly')) {
exclude 'conf/sonar.properties' exclude 'conf/sonar.properties'
exclude 'conf/wrapper.conf' exclude 'conf/wrapper.conf'

Loading…
Cancel
Save