Skip to content

Commit

Permalink
TH2-1836
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey.shulika committed Aug 10, 2023
1 parent 153bf4d commit 1e8ab47
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.github.jk1.license.filter.LicenseBundleNormalizer
import com.github.jk1.license.render.JsonReportRenderer

plugins {
id "org.jetbrains.kotlin.jvm" version "${kotlin_version}"
id "org.jetbrains.kotlin.kapt" version "${kotlin_version}"
Expand All @@ -11,6 +14,8 @@ plugins {
id 'signing'
id 'distribution'
id "org.owasp.dependencycheck" version "${owaspVersion}"
id 'com.github.jk1.dependency-license-report' version '2.5'
id "de.undercouch.download" version "5.4.0"
}

ext {
Expand Down Expand Up @@ -252,4 +257,25 @@ configurations {
compileClasspath {
resolutionStrategy.activateDependencyLocking()
}
}
}

licenseReport {
def licenseNormalizerBundlePath = "$buildDir/license-normalizer-bundle.json"

if (!file(licenseNormalizerBundlePath).exists()) {
download.run {
src 'https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/license-normalizer-bundle.json'
dest "$buildDir/license-normalizer-bundle.json"
overwrite false
}
}

filters = [
new LicenseBundleNormalizer(licenseNormalizerBundlePath, false)
]
renderers = [
new JsonReportRenderer('licenses.json', false),
]
excludeOwnGroup = false
allowedLicensesFile = new URL("https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/allowed-licenses.json")
}

0 comments on commit 1e8ab47

Please sign in to comment.