diff --git a/.github/workflows/dev-release-java-publish-sonatype-and-docker.yml b/.github/workflows/build-dev-release.yml similarity index 64% rename from .github/workflows/dev-release-java-publish-sonatype-and-docker.yml rename to .github/workflows/build-dev-release.yml index 9c3e5df..6cc5c82 100644 --- a/.github/workflows/dev-release-java-publish-sonatype-and-docker.yml +++ b/.github/workflows/build-dev-release.yml @@ -1,22 +1,19 @@ -name: Build and release Java distributions to sonatype. +name: Build and publish dev release Docker image to Github Container Registry ghcr.io and publish dev release jar to sonatype -on: - push: - tags: - - \d+.\d+.\d+-dev +on: workflow_dispatch jobs: build: uses: th2-net/.github/.github/workflows/compound-java.yml@main with: build-target: 'Sonatype,Docker' - runsOn: ubuntu-latest - gradleVersion: '7' - docker-username: ${{ github.actor }} devRelease: true + createTag: true + docker-username: ${{ github.actor }} secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }} sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} - docker-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..9251e4e --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,19 @@ +name: Build and publish release Docker image to Github Container Registry ghcr.io and publish release jar to sonatype + +on: workflow_dispatch + +jobs: + build: + uses: th2-net/.github/.github/workflows/compound-java.yml@main + with: + build-target: 'Sonatype,Docker' + devRelease: false + createTag: true + docker-username: ${{ github.actor }} + secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} + sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }} + sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/build-sanpshot.yml b/.github/workflows/build-sanpshot.yml new file mode 100644 index 0000000..fc014bf --- /dev/null +++ b/.github/workflows/build-sanpshot.yml @@ -0,0 +1,24 @@ +name: Build and publish Docker image to Github Container Registry ghcr.io and publish snapshot jar to sonatype + +on: + push: + branches-ignore: + - master + - version-* + - dependabot** + paths-ignore: + - README.md + +jobs: + build-job: + uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main + with: + build-target: 'Sonatype,Docker' + docker-username: ${{ github.actor }} + secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} + sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }} + sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/dev-docker-publish.yml b/.github/workflows/dev-docker-publish.yml deleted file mode 100644 index 6f77755..0000000 --- a/.github/workflows/dev-docker-publish.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Dev build and publish Docker distributions to Github Container Registry ghcr.io - -on: - push: - branches-ignore: - - master - - version-* - - dependabot** - paths-ignore: - - README.md - -jobs: - build-job: - uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main - with: - build-target: 'Docker' - docker-username: ${{ github.actor }} - secrets: - docker-password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dev-release-docker-publish.yml b/.github/workflows/dev-release-docker-publish.yml deleted file mode 100644 index a0bbd32..0000000 --- a/.github/workflows/dev-release-docker-publish.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build and publish Docker distributions to Github Container Registry ghcr.io - -on: - workflow_dispatch: - push: - branches: - - dev-version-* - paths: - - gradle.properties - -jobs: - build-job: - uses: th2-net/.github/.github/workflows/compound-java.yml@main - with: - build-target: 'Docker' - docker-username: ${{ github.actor }} - devRelease: true - secrets: - docker-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index cec50a6..0000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Build and publish Docker distributions to Github Container Registry ghcr.io - -on: - push: - branches: - - master - - version-* - paths: - - gradle.properties -# - package_info.json - -jobs: - build-job: - uses: th2-net/.github/.github/workflows/compound-java.yml@main - with: - build-target: 'Docker' - docker-username: ${{ github.actor }} - secrets: - docker-password: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file diff --git a/README.md b/README.md index 1bd2093..5e7e24e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Csv codec (5.2.1) +# Csv codec (5.3.0) ## Description @@ -141,6 +141,14 @@ spec: ## Release notes +### 5.3.0 ++ Migrated to th2 gradle plugin: `0.0.6` ++ Updated: + + bom `4.6.1` + + common: `5.10.1-dev` + + common-utils: `2.2.3-dev` + + codec: `5.5.0-dev` + ### 5.2.1 + Updated common: `5.7.2-dev` diff --git a/build.gradle b/build.gradle index 3d71fc8..a7cc66e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,32 +1,67 @@ -buildscript { - repositories { - gradlePluginPortal() - maven { - url = "https://s01.oss.sonatype.org/content/repositories/snapshots/" - } - } - dependencies { - classpath "com.exactpro.th2:th2-gradle-plugin:0.0.1-dev-5915772757-13a28ae-SNAPSHOT" - } +plugins { + id "org.jetbrains.kotlin.jvm" version "1.8.22" + id "org.jetbrains.kotlin.kapt" version "1.8.22" + id("java-library") + id("maven-publish") + + id "com.exactpro.th2.gradle.publish" version "0.0.6" + id "com.exactpro.th2.gradle.component" version "0.0.6" } -apply plugin: "com.exactpro.th2.common-conventions" -apply plugin: "com.exactpro.th2.docker-conventions" +group = 'com.exactpro.th2' +version = release_version + +kotlin { + jvmToolchain(11) +} -apply plugin: 'kotlin-kapt' +repositories { + mavenCentral() + maven { + name 'Sonatype_snapshots' + url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + } + maven { + name 'Sonatype_releases' + url 'https://s01.oss.sonatype.org/content/repositories/releases/' + } + mavenLocal() + + configurations.configureEach { + resolutionStrategy.cacheChangingModulesFor 0, 'seconds' + resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' + } +} dependencies { - api platform("com.exactpro.th2:bom:4.5.0") - implementation "com.exactpro.th2:common:5.7.2-dev" - implementation "com.exactpro.th2:common-utils:2.2.2-dev" - implementation "com.exactpro.th2:codec:5.4.1-dev" + implementation "com.exactpro.th2:common:5.10.1-dev" + implementation "com.exactpro.th2:common-utils:2.2.3-dev" + implementation "com.exactpro.th2:codec:5.5.0-dev" implementation "org.apache.commons:commons-lang3" implementation "com.fasterxml.jackson.core:jackson-databind" implementation "net.sourceforge.javacsv:javacsv:2.0" + implementation "io.github.microutils:kotlin-logging:3.0.5" + compileOnly "com.google.auto.service:auto-service-annotations:1.1.1" - annotationProcessor "com.google.auto.service:auto-service:1.1.1" kapt "com.google.auto.service:auto-service:1.1.1" + + testImplementation "org.jetbrains.kotlin:kotlin-test-junit" + testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.3.1' + testImplementation 'io.strikt:strikt-core:0.34.1' +} + +application { + mainClass.set("com.exactpro.th2.codec.MainKt") +} + +test { + useJUnitPlatform() +} + +dependencyCheck { + suppressionFile='supressions.xml' } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 530077f..0752ea5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1 @@ -release_version=5.2.1 -app_main_class=com.exactpro.th2.codec.MainKt +release_version=5.3.0 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c34b2dc..6c9fe73 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip diff --git a/supressions.xml b/supressions.xml new file mode 100644 index 0000000..0c032ab --- /dev/null +++ b/supressions.xml @@ -0,0 +1,10 @@ + + + + + + + ^pkg:maven/com\.exactpro\.th2/grpc-.*@.*$ + cpe:/a:grpc:grpc + + \ No newline at end of file