Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated th2 gradle plugin 0.1.8 (bom: 4.10.0) #326

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
schedule:
interval: "daily"
allow:
# Allow updates for Exactpro packages
- dependency-name: "com.exactpro*"
- dependency-name: '*'
dependency-type: production
# Allow up to 10 open pull requests
open-pull-requests-limit: 10
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2 common library (Java) (5.14.0)
# th2 common library (Java) (5.15.0)

## Usage

Expand Down Expand Up @@ -511,6 +511,16 @@ dependencies {

## Release notes

### 5.15.0-dev

+ Updated:
+ th2 gradle plugin `0.1.8` (bom: `4.10.0`)
+ cradle: `5.4.4-dev`
+ grpc: `1.70.0`
+ grpc-service-generator: `3.7.0`
+ Migrated:
+ io.github.oshai:kotlin-logging: `5.1.4`

### 5.14.0-dev

+ Separate connections for publisher and consumer (allows to consume while publishing is blocked by RabbitMQ)
Expand Down
72 changes: 31 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id "com.exactpro.th2.gradle.base" version "0.1.1"
id "com.exactpro.th2.gradle.publish" version "0.1.1"
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
id 'org.jetbrains.kotlin.kapt' version "$kotlin_version"
alias(libs.plugins.th2.publish)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.protobuf)
alias(libs.plugins.jmh)
id "java-library"
id "java-test-fixtures"
id "maven-publish"
id "com.google.protobuf" version "0.9.4"
id "me.champeau.jmh" version "0.7.2"
}

group = 'com.exactpro.th2'
version = release_version

ext {
grpcVersion = '1.62.2'
protobufVersion = '3.25.3'
serviceGeneratorVersion = '3.6.1'

cradleVersion = '5.4.1-dev'
junitVersion = '5.10.3'

jmhVersion = '1.37'
autoValueVersion = '1.10.4'
genBaseDir = file("${buildDir}/generated/source/proto")
}

Expand Down Expand Up @@ -73,25 +63,25 @@ tasks.register('integrationTest', Test) {
}

dependencies {
api('com.exactpro.th2:grpc-common:4.5.0-dev') {
api(libs.th2.grpc.common) {
because('protobuf transport is main now, this dependency should be moved to grpc, mq protobuf modules after splitting')
}
api("com.exactpro.th2:cradle-core:$cradleVersion") {
api(libs.th2.cradle.core) {
because('cradle is included into common library now, this dependency should be moved to a cradle module after splitting')
}
api('io.netty:netty-buffer') {
because('th2 transport protocol is included into common library now, this dependency should be moved to a th2 transport module after splitting')
}

jmh "org.openjdk.jmh:jmh-core:$jmhVersion"
jmh "org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion"
jmh libs.jmh.core
jmh libs.jmh.generator.annprocess

implementation 'com.google.protobuf:protobuf-java-util'
implementation "com.exactpro.th2:grpc-service-generator:$serviceGeneratorVersion"
implementation "com.exactpro.th2:cradle-cassandra:$cradleVersion"
implementation libs.th2.grpc.service.generator
implementation libs.th2.cradle.cassandra

implementation "com.google.auto.value:auto-value-annotations:$autoValueVersion"
kapt("com.google.auto.value:auto-value:$autoValueVersion") {
implementation libs.auto.value.annotations
kapt(libs.auto.value) {
//FIXME: Updated library because it is fat jar
// auto-value-1.10.1.jar/META-INF/maven/com.google.guava/guava/pom.xml (pkg:maven/com.google.guava/[email protected], cpe:2.3:a:google:guava:31.1:*:*:*:*:*:*:*) : CVE-2023-2976, CVE-2020-8908
}
Expand Down Expand Up @@ -138,38 +128,38 @@ dependencies {
implementation 'io.prometheus:simpleclient_httpserver'
implementation 'io.prometheus:simpleclient_log4j2'

implementation("com.squareup.okio:okio:3.4.0") {
implementation(libs.okio) {
because('fix vulnerability in transitive dependency <com.squareup.okhttp3:okhttp>' +
'Note: kotlin:1.9 is transitive dependency since 3.5.0')
}
implementation("com.squareup.okhttp3:okhttp:4.11.0") {
implementation(libs.okhttp3.okhttp) {
because('fix vulnerability in transitive dependency <kubernetes-client>. ' +
'Note: kotlin:1.9 is transitive dependency since 4.12.0')
}
implementation('com.squareup.okhttp3:logging-interceptor:4.11.0') {
implementation(libs.okhttp3.logging.interceptor) {
because('fix vulnerability in transitive dependency <kubernetes-client>. ' +
'Note: kotlin:1.9 is transitive dependency since 4.12.0')
}

implementation("io.fabric8:kubernetes-client:6.13.1") {
implementation(libs.kubernetes.client) {
exclude group: 'com.fasterxml.jackson.dataformat', module: 'jackson-dataformat-yaml'
}

implementation "io.github.microutils:kotlin-logging:3.0.5"
implementation libs.kotlin.logging

testImplementation 'javax.annotation:javax.annotation-api:1.3.2'
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation "org.mockito.kotlin:mockito-kotlin:5.3.1"
testImplementation libs.javax.annotation.api
testImplementation libs.junit.jupiter
testImplementation libs.mockito.kotlin
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testImplementation "org.testcontainers:testcontainers:1.19.8"
testImplementation "org.testcontainers:rabbitmq:1.19.8"
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") {
testImplementation libs.testcontainers
testImplementation libs.testcontainers.rabbitmq
testImplementation(libs.junit.pioneer) {
because("system property tests")
}
testImplementation("org.awaitility:awaitility:4.2.1")
testImplementation libs.awaitility

testFixturesImplementation "org.jetbrains.kotlin:kotlin-test-junit5:$kotlin_version"
testFixturesImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testFixturesImplementation libs.kotlin.test.junit5
testFixturesImplementation libs.junit.jupiter
}

// substitute commons-compress:1.24.0 from testcontainers:1.19.8 to version 1.26.2
Expand All @@ -178,7 +168,7 @@ configurations {
configureEach {
resolutionStrategy {
dependencySubstitution {
substitute module('org.apache.commons:commons-compress') using module('org.apache.commons:commons-compress:1.26.2')
substitute module('org.apache.commons:commons-compress') using module("${libs.commons.compress.get()}")
}
}
}
Expand All @@ -191,14 +181,14 @@ sourceSets {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protobufVersion"
artifact = "${libs.protobuf.protoc.get()}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
artifact = "${libs.protoc.gen.grpc.java.get()}"
}
services {
artifact = "com.exactpro.th2:grpc-service-generator:$serviceGeneratorVersion:all@jar"
artifact = "${libs.th2.grpc.service.generator.get()}:all@jar"
}
}
generateProtoTasks {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2022-2024 Exactpro (Exactpro Systems Limited)
# Copyright 2022-2025 Exactpro (Exactpro Systems Limited)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
release_version=5.14.0
release_version=5.15.0
kotlin_version=1.8.22
description='th2 common library (Java)'
vcs_url=https://github.com/th2-net/th2-common-j
Expand Down
51 changes: 51 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[versions]
kotlin = "1.8.22"
protobuf = "3.25.5" # gRPC 1.66 libraries uses protobuf 3.+
cradle = "5.4.4-dev"
jmh = "1.37"
okhttp = "4.11.0"
testcontainers = "1.19.8"
auto-value = "1.10.4"

[libraries]
jmh-core = { group = "org.openjdk.jmh", name = "jmh-core", version.ref = "jmh" }
jmh-generator-annprocess = { group = "org.openjdk.jmh", name = "jmh-generator-annprocess", version.ref = "jmh" }

protoc-gen-grpc-java = { group = "io.grpc", name = "protoc-gen-grpc-java", version = "1.70.0" }
protobuf-protoc = { group = "com.google.protobuf", name = "protoc", version.ref = "protobuf" }

auto-value-annotations = { group = "com.google.auto.value", name = "auto-value-annotations", version.ref = "auto-value" }
auto-value = { group = "com.google.auto.value", name = "auto-value", version.ref = "auto-value" }

java-uuid-generator = { group = "com.fasterxml.uuid", name = "java-uuid-generator", version = "5.1.0" }

kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version = "5.1.4" }
kotlin-test-junit5 = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit5", version.ref = "kotlin" }

commons-compress = { group = "org.apache.commons", name = "commons-compress", version = "1.26.2" }

okio = { group = "com.squareup.okio", name = "okio", version = "3.4.0" }
okhttp3-okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
okhttp3-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
kubernetes-client = { group = "io.fabric8", name = "kubernetes-client", version = "6.13.1" }

th2-grpc-common = { group = "com.exactpro.th2", name = "grpc-common", version = "4.5.0-dev" }
th2-grpc-service-generator = { group = "com.exactpro.th2", name = "grpc-service-generator", version = "3.7.0" }

th2-cradle-core = { group = "com.exactpro.th2", name = "cradle-core", version.ref = "cradle" }
th2-cradle-cassandra = { group = "com.exactpro.th2", name = "cradle-cassandra", version.ref = "cradle" }

junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version = "5.11.4" }
javax-annotation-api = { group = "javax.annotation", name = "javax.annotation-api", version = "1.3.2" }
mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version = "5.3.1" }
testcontainers = { group = "org.testcontainers", name = "testcontainers", version.ref = "testcontainers" }
testcontainers-rabbitmq = { group = "org.testcontainers", name = "rabbitmq", version.ref = "testcontainers" }
junit-pioneer = { group = "org.junit-pioneer", name = "junit-pioneer", version = "2.2.0" }
awaitility = { group = "org.awaitility", name = "awaitility", version = "4.2.1" }

[plugins]
th2-publish = { id = "com.exactpro.th2.gradle.publish", version = "0.1.8" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
protobuf = { id = "com.google.protobuf", version = "0.9.4" }
jmh = { id = "me.champeau.jmh", version = "0.7.2" }
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Jul 02 11:31:27 GMT+04:00 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading