1- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
21import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3- import com.github.jk1.license.filter.LicenseBundleNormalizer
4- import com.github.jk1.license.render.JsonReportRenderer
52
63plugins {
7- id ' java'
4+ id " application"
5+ id " com.exactpro.th2.gradle.component" version " 0.0.8"
86 id ' org.jetbrains.kotlin.jvm' version ' 1.8.22'
9- id ' com.palantir.docker' version ' 0.25.0'
10- id " org.owasp.dependencycheck" version " 9.0.9"
11- id " com.gorylenko.gradle-git-properties" version " 2.4.1"
12- id ' com.github.jk1.dependency-license-report' version ' 2.5'
13- id " de.undercouch.download" version " 5.6.0"
7+ id " org.jetbrains.kotlin.kapt" version " 1.8.22"
148}
159
16- apply plugin : ' application'
17- apply plugin : ' com.palantir.docker'
18- apply plugin : ' kotlin-kapt'
19-
2010group ' com.exactpro.th2'
2111version release_version
2212
23- sourceCompatibility = 11
24- targetCompatibility = 11
13+ kotlin {
14+ jvmToolchain(11 )
15+ }
2516
2617repositories {
2718 mavenCentral()
@@ -45,14 +36,12 @@ repositories {
4536}
4637
4738dependencies {
48- api platform(' com.exactpro.th2:bom:4.6.1' )
49-
50- implementation(" com.exactpro.th2:common:5.10.0-dev" ) {
39+ implementation(" com.exactpro.th2:common:5.13.1-dev" ) {
5140 exclude group : ' com.exactpro.th2' , module : ' task-utils'
5241 }
5342 implementation " com.exactpro.th2:common-utils:2.2.3-dev"
5443 implementation ' com.exactpro.th2:netty-bytebuf-utils:0.0.1'
55- implementation ' com.exactpro.th2:conn-dirty-tcp-core:3.5 .0-dev'
44+ implementation' com.exactpro.th2:conn-dirty-tcp-core:3.6 .0-dev'
5645 implementation ' com.exactpro.th2:grpc-lw-data-provider:2.3.1-dev'
5746
5847 implementation ' org.slf4j:slf4j-api'
@@ -66,7 +55,7 @@ dependencies {
6655 implementation ' com.fasterxml.jackson.core:jackson-databind'
6756 implementation ' com.fasterxml.jackson.module:jackson-module-kotlin'
6857
69- testImplementation ' org.mockito:mockito-all:1.10.19 '
58+ testImplementation ' org.mockito:mockito-core:5.12.0 '
7059 testImplementation ' org.jetbrains.kotlin:kotlin-test-junit5:1.8.22'
7160
7261 annotationProcessor ' com.google.auto.service:auto-service:1.1.1'
@@ -81,61 +70,8 @@ application {
8170 mainClass. set(' com.exactpro.th2.conn.dirty.tcp.core.Main' )
8271}
8372
84- applicationName = ' service'
85-
86- distTar {
87- archiveFileName. set(" ${ applicationName} .tar" )
88- }
89-
90- dockerPrepare {
91- dependsOn distTar
92- }
93-
94- docker {
95- copySpec. from(tarTree(" $buildDir /distributions/${ applicationName} .tar" ))
96- }
97-
98- tasks. withType(KotlinCompile ). configureEach {
99- compilerOptions {
100- jvmTarget. set(JvmTarget . JVM_11 )
101- }
102- }
103-
10473dependencyCheck {
105- formats= [' SARIF' , ' JSON' , ' HTML' ]
106- failBuildOnCVSS= 5
10774 suppressionFile= " suppressions.xml"
108-
10975 // FIXME: we should check all used dependencies
11076 skipConfigurations = [' kapt' , ' kaptClasspath_kaptKotlin' , ' kaptTest' , ' kaptTestFixtures' , ' annotationProcessor' ]
111- analyzers {
112- assemblyEnabled = false
113- nugetconfEnabled = false
114- nodeEnabled = false
115- }
116- }
117-
118- dependencyLocking {
119- lockAllConfigurations()
120- }
121-
122- licenseReport {
123- def licenseNormalizerBundlePath = " $buildDir /license-normalizer-bundle.json"
124-
125- if (! file(licenseNormalizerBundlePath). exists()) {
126- download. run {
127- src ' https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/license-normalizer-bundle.json'
128- dest " $buildDir /license-normalizer-bundle.json"
129- overwrite false
130- }
131- }
132-
133- filters = [
134- new LicenseBundleNormalizer (licenseNormalizerBundlePath, false )
135- ]
136- renderers = [
137- new JsonReportRenderer (' licenses.json' , false ),
138- ]
139- excludeOwnGroup = false
140- allowedLicensesFile = new URL (" https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/allowed-licenses.json" )
14177}
0 commit comments