From 0256b76a1b1604becc5f42d921a4656f8cffa493 Mon Sep 17 00:00:00 2001 From: Nikita Smirnov <46124551+Nikita-Smirnov-Exactpro@users.noreply.github.com> Date: Thu, 2 May 2024 13:24:44 +0400 Subject: [PATCH] Migrated to th2 gradle plugin: `0.0.6` (#99) * migrated to release version codec-sailfish:5.1.0-dev --- README.md | 10 ++++++- build.gradle | 70 ++++------------------------------------------- gradle.properties | 4 +-- suppressions.xml | 6 ++++ 4 files changed, 23 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 772a3b4..616b8a8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# General codecs (5.0.0) +# General codecs (5.1.0) This repository contains the build scripts for general codecs: + [fix](codec-fix/README.md) @@ -14,6 +14,14 @@ _Do not specify default parameters if you don't want to override them_ (just bec # Changes +### 5.1.0 + ++ Migrated to th2 gradle plugin: `0.0.6` ++ Updated: + + bom: `4.6.1` + + codec-sailfish: `5.1.0-dev` + + sailfish: `3.3.202` + ### 5.0.0 + Update codec-sailfish: `5.0.0` diff --git a/build.gradle b/build.gradle index e335232..522854f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,24 +1,18 @@ -import com.github.jk1.license.filter.LicenseBundleNormalizer -import com.github.jk1.license.render.JsonReportRenderer - plugins { - id 'com.palantir.docker' version '0.25.0' apply false - id 'application' - id "org.owasp.dependencycheck" version "8.3.1" - id 'com.github.jk1.dependency-license-report' version '2.5' - id "de.undercouch.download" version "5.4.0" + id "com.exactpro.th2.gradle.base" version "0.0.6" + id "com.exactpro.th2.gradle.component" version "0.0.6" apply false } subprojects { apply plugin: 'java' - apply plugin: 'com.palantir.docker' + apply plugin: 'com.exactpro.th2.gradle.component' apply plugin: 'application' ext { resourceDir = "src/main/resources" baseSailfishVersion = '3.3' - sailfishVersion = "3.3.169" + sailfishVersion = "3.3.202" dockerCodecImplementationDir = 'codec_implementation' } @@ -79,7 +73,6 @@ subprojects { } dependencies { - implementation (platform("com.exactpro.th2:bom:4.5.0")) implementation("com.exactpro.sf:${sf_service_name}:${sailfishVersion}") { exclude module: 'sailfish-core' exclude module: 'sailfish-common' @@ -89,65 +82,14 @@ subprojects { exclude module: 'kotlin-stdlib' exclude module: 'kotlin-stdlib-common' } - implementation 'com.exactpro.th2:codec-sailfish:5.0.0-dev' - } - - jar { - manifest { - attributes( - 'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})", - 'Specification-Title': '', - 'Specification-Vendor': 'Exactpro Systems LLC', - 'Implementation-Title': project.name, - 'Implementation-Vendor': 'Exactpro Systems LLC', - 'Implementation-Vendor-Id': 'com.exactpro', - 'Implementation-Version': project.version - ) - } - } - - dockerPrepare { - dependsOn installDist - } - - docker { - copySpec.from("$buildDir/install") + implementation 'com.exactpro.th2:codec-sailfish:5.1.0-dev' } application { - applicationName("service") mainClass.set("com.exactpro.th2.codec.MainKt") } } dependencyCheck { - formats = ['SARIF', 'JSON', 'HTML'] - failBuildOnCVSS = 5 suppressionFile = file('suppressions.xml') - analyzers { - assemblyEnabled = false - nugetconfEnabled = false - nodeEnabled = false - } -} - -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") -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 85e3ecd..ca5f8b5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -release_version=5.0.0 +release_version=5.1.0 sf_service_name = unknown-service -docker_image_name = th2-codec-generic +docker_image_name = th2-codec-generic \ No newline at end of file diff --git a/suppressions.xml b/suppressions.xml index a7dc9b5..5a8ed21 100644 --- a/suppressions.xml +++ b/suppressions.xml @@ -1,5 +1,11 @@ + + + + ^pkg:maven/com\.exactpro\.th2/grpc-.*@.*$ + cpe:/a:grpc:grpc +