Skip to content

Commit f24e2ae

Browse files
build: adopt hypertrace shared BOM and version catalog
Migrates the project to the canonical hypertrace pattern: the shared hypertrace-bom catalog drives common dep/plugin versions and the java-convention plugin standardizes JVM toolchain handling. Repo-local deps move to gradle/libs.versions.toml exposed as localLibs. - settings.gradle.kts: apply org.hypertrace.dependency-settings 0.2.0 with catalogVersion 0.3.80 (auto-registers commonLibs and localLibs) - gradle/libs.versions.toml: repo-local catalog (mockito, log4j, junit- pioneer, caffeine, avro, hypertrace-config-partitioner-api, grpc-netty, hypertrace-grpcutils-context, plus the avro plugin which is not in BOM) - build.gradle.kts: replace per-module hand-rolled plugin versions with alias(commonLibs.plugins.*); apply hypertrace.java-convention (toolchain 21 default, releaseCompatibility 11) so dep/JDK upgrades come for free via BOM bumps - Subprojects: rewrite to alias(commonLibs.*)/alias(localLibs.*) and add api(platform(commonLibs.hypertrace.bom)) for managed versions - Generate gradle.lockfile per module (settings-gradle.lockfile not tracked per the BOM doc) - Add .github/workflows/update-locks.yml: weekly schedule keeps locks in sync with newly published BOM versions - Bump pr-build/pr-test java-version 17 to 21 to match toolchain default
1 parent ab014af commit f24e2ae

16 files changed

Lines changed: 520 additions & 91 deletions

File tree

.github/workflows/pr-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/setup-java@v4
2323
with:
2424
distribution: 'temurin'
25-
java-version: '17'
25+
java-version: '21'
2626

2727
- name: Build with Gradle
2828
uses: hypertrace/github-actions/gradle@main

.github/workflows/pr-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/setup-java@v4
1919
with:
2020
distribution: 'temurin'
21-
java-version: '17'
21+
java-version: '21'
2222

2323
- name: Unit test
2424
uses: hypertrace/github-actions/gradle@main
@@ -56,7 +56,7 @@ jobs:
5656
- uses: actions/setup-java@v4
5757
with:
5858
distribution: 'temurin'
59-
java-version: '17'
59+
java-version: '21'
6060
- name: Dependency Check
6161
uses: hypertrace/github-actions/dependency-check@main
6262
with:

.github/workflows/update-locks.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update Locks
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '37 21 * * 3'
6+
jobs:
7+
update-versions:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- name: Check out code
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- name: Calculate simple repository name
15+
id: repo-basename
16+
shell: bash
17+
run: |
18+
echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT
19+
- name: Get Token from Github App
20+
uses: tibdex/github-app-token@v2
21+
id: generate-token
22+
with:
23+
app_id: ${{ secrets.GH_CI_APP_ID }}
24+
private_key: ${{ secrets.GH_CI_APP_PRIVATE_KEY }}
25+
repositories: >-
26+
[${{ toJson(steps.repo-basename.outputs.value) }}]
27+
- name: Update locks if needed
28+
uses: hypertrace/github-actions/raise-lock-pr@main
29+
with:
30+
token: ${{ steps.generate-token.outputs.token }}

build.gradle.kts

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,25 @@ import org.hypertrace.gradle.publishing.HypertracePublishExtension
22
import org.hypertrace.gradle.publishing.License
33

44
plugins {
5-
id("org.hypertrace.repository-plugin") version "0.5.0"
6-
id("org.hypertrace.ci-utils-plugin") version "0.4.0"
7-
id("org.hypertrace.avro-plugin") version "0.5.1" apply false
8-
id("org.hypertrace.publish-plugin") version "1.1.1" apply false
9-
id("org.hypertrace.jacoco-report-plugin") version "0.3.0" apply false
10-
id("org.hypertrace.code-style-plugin") version "2.1.2" apply false
11-
id("org.owasp.dependencycheck") version "12.1.3"
5+
alias(commonLibs.plugins.hypertrace.repository)
6+
alias(commonLibs.plugins.hypertrace.ciutils)
7+
alias(commonLibs.plugins.hypertrace.publish) apply false
8+
alias(commonLibs.plugins.hypertrace.codestyle) apply false
9+
alias(commonLibs.plugins.hypertrace.java.convention)
10+
alias(commonLibs.plugins.owasp.dependencycheck)
11+
alias(localLibs.plugins.hypertrace.avro) apply false
1212
}
1313

1414
subprojects {
1515
group = "org.hypertrace.core.kafkastreams.framework"
16-
pluginManager.withPlugin("org.hypertrace.publish-plugin") {
16+
pluginManager.withPlugin(rootProject.commonLibs.plugins.hypertrace.publish.get().pluginId) {
1717
configure<HypertracePublishExtension> {
1818
license.set(License.APACHE_2_0)
1919
}
2020
}
2121

2222
pluginManager.withPlugin("java") {
23-
configure<JavaPluginExtension> {
24-
// Use a Gradle toolchain so the build provisions and compiles with JDK 17
25-
// regardless of the launcher JDK the CI action uses (the shared
26-
// hypertrace gradle action launches with JDK 11).
27-
toolchain {
28-
languageVersion.set(JavaLanguageVersion.of(17))
29-
}
30-
31-
apply(plugin = "org.hypertrace.code-style-plugin")
32-
}
23+
apply(plugin = rootProject.commonLibs.plugins.hypertrace.codestyle.get().pluginId)
3324
}
3425

3526
// Handle lz4-java redirect capability conflict:
@@ -49,4 +40,4 @@ dependencyCheck {
4940
suppressionFile = "owasp-suppressions.xml"
5041
scanConfigurations.add("runtimeClasspath")
5142
failBuildOnCVSS = 3.0F
52-
}
43+
}

gradle/libs.versions.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[versions]
2+
mockito = "5.15.2"
3+
log4j = "2.20.0"
4+
caffeine = "3.1.8"
5+
junit-pioneer = "2.3.0"
6+
hypertrace-config = "0.1.73"
7+
hypertrace-grpcutils = "0.13.23"
8+
grpc = "1.68.1"
9+
hypertrace-avro-plugin = "0.5.1"
10+
11+
[plugins]
12+
hypertrace-avro = { id = "org.hypertrace.avro-plugin", version.ref = "hypertrace-avro-plugin" }
13+
14+
[libraries]
15+
junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version.ref = "junit-pioneer" }
16+
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
17+
log4j-slf4j-impl = { module = "org.apache.logging.log4j:log4j-slf4j-impl", version.ref = "log4j" }
18+
hamcrest-core = { module = "org.hamcrest:hamcrest-core", version = "2.2" }
19+
caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "caffeine" }
20+
kafka-streams-avro-serde = { module = "io.confluent:kafka-streams-avro-serde" }
21+
kafka-streams-test-utils = { module = "org.apache.kafka:kafka-streams-test-utils" }
22+
avro = { module = "org.apache.avro:avro" }
23+
hypertrace-grpcutils-context = { module = "org.hypertrace.core.grpcutils:grpc-context-utils", version.ref = "hypertrace-grpcutils" }
24+
hypertrace-config-partitioner-api = { module = "org.hypertrace.config.service:partitioner-config-service-api", version.ref = "hypertrace-config" }
25+
grpc-netty = { module = "io.grpc:grpc-netty", version.ref = "grpc" }

kafka-event-listener/build.gradle.kts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
plugins {
22
`java-library`
33
jacoco
4-
id("org.hypertrace.publish-plugin")
5-
id("org.hypertrace.jacoco-report-plugin")
4+
alias(commonLibs.plugins.hypertrace.publish)
5+
alias(commonLibs.plugins.hypertrace.jacoco)
66
id("java-test-fixtures")
77
}
88

99
dependencies {
10-
annotationProcessor("org.projectlombok:lombok:1.18.38")
11-
compileOnly("org.projectlombok:lombok:1.18.38")
10+
annotationProcessor(commonLibs.lombok)
11+
compileOnly(commonLibs.lombok)
1212

1313
api(platform(project(":kafka-bom")))
14-
api("org.apache.kafka:kafka-clients")
14+
api(platform(commonLibs.hypertrace.bom))
15+
api(commonLibs.kafka.clients)
1516

16-
implementation("org.hypertrace.core.serviceframework:platform-metrics:0.1.89")
17-
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
18-
testImplementation("org.mockito:mockito-core:5.2.0")
19-
testImplementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
17+
implementation(commonLibs.hypertrace.framework.metrics.jakarta)
18+
testImplementation(commonLibs.junit.jupiter)
19+
testImplementation(localLibs.mockito.core)
20+
testImplementation(localLibs.caffeine)
2021

2122
testFixturesApi(platform(project(":kafka-bom")))
22-
testFixturesApi("org.apache.kafka:kafka-clients")
23+
testFixturesApi(commonLibs.kafka.clients)
2324
}
2425

2526
tasks.test {
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
at.yawk.lz4:lz4-java:1.8.1=runtimeClasspath,testRuntimeClasspath
5+
com.fasterxml.jackson:jackson-bom:2.21.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
6+
com.github.ben-manes.caffeine:caffeine:3.1.8=testCompileClasspath,testRuntimeClasspath
7+
com.github.luben:zstd-jni:1.5.6-3=runtimeClasspath,testRuntimeClasspath
8+
com.google.code.findbugs:jsr305:3.0.2=runtimeClasspath,testRuntimeClasspath
9+
com.google.errorprone:error_prone_annotations:2.18.0=runtimeClasspath
10+
com.google.errorprone:error_prone_annotations:2.21.1=testCompileClasspath,testRuntimeClasspath
11+
com.google.guava:failureaccess:1.0.1=runtimeClasspath,testRuntimeClasspath
12+
com.google.guava:guava-parent:32.1.2-jre=runtimeClasspath,testRuntimeClasspath
13+
com.google.guava:guava:32.1.2-jre=runtimeClasspath,testRuntimeClasspath
14+
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=runtimeClasspath,testRuntimeClasspath
15+
com.typesafe:config:1.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
16+
io.dropwizard.metrics:metrics-core:4.2.25=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
17+
io.dropwizard.metrics:metrics-jakarta-servlet:4.2.25=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
18+
io.dropwizard.metrics:metrics-jvm:4.2.25=runtimeClasspath,testRuntimeClasspath
19+
io.github.mweirauch:micrometer-jvm-extras:0.2.2=runtimeClasspath,testRuntimeClasspath
20+
io.grpc:grpc-bom:1.75.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
21+
io.micrometer:micrometer-commons:1.14.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
22+
io.micrometer:micrometer-core:1.14.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
23+
io.micrometer:micrometer-observation:1.14.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
24+
io.micrometer:micrometer-registry-prometheus-simpleclient:1.14.4=runtimeClasspath,testRuntimeClasspath
25+
io.netty:netty-bom:4.1.133.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
26+
io.prometheus:simpleclient:0.16.0=runtimeClasspath,testRuntimeClasspath
27+
io.prometheus:simpleclient_common:0.16.0=runtimeClasspath,testRuntimeClasspath
28+
io.prometheus:simpleclient_dropwizard:0.16.0=runtimeClasspath,testRuntimeClasspath
29+
io.prometheus:simpleclient_pushgateway:0.16.0=runtimeClasspath,testRuntimeClasspath
30+
io.prometheus:simpleclient_servlet_common:0.16.0=runtimeClasspath,testRuntimeClasspath
31+
io.prometheus:simpleclient_servlet_jakarta:0.16.0=runtimeClasspath,testRuntimeClasspath
32+
io.prometheus:simpleclient_tracer_common:0.16.0=runtimeClasspath,testRuntimeClasspath
33+
io.prometheus:simpleclient_tracer_otel:0.16.0=runtimeClasspath,testRuntimeClasspath
34+
io.prometheus:simpleclient_tracer_otel_agent:0.16.0=runtimeClasspath,testRuntimeClasspath
35+
jakarta.servlet:jakarta.servlet-api:6.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
36+
net.bytebuddy:byte-buddy-agent:1.15.11=testCompileClasspath,testRuntimeClasspath
37+
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testRuntimeClasspath
38+
org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
39+
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
40+
org.checkerframework:checker-qual:3.33.0=runtimeClasspath
41+
org.checkerframework:checker-qual:3.37.0=testCompileClasspath,testRuntimeClasspath
42+
org.eclipse.jetty.ee10:jetty-ee10-bom:12.1.9=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
43+
org.eclipse.jetty.ee10:jetty-ee10-servlet:12.1.9=runtimeClasspath,testRuntimeClasspath
44+
org.eclipse.jetty:jetty-bom:12.1.9=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
45+
org.eclipse.jetty:jetty-http:12.1.9=runtimeClasspath,testRuntimeClasspath
46+
org.eclipse.jetty:jetty-io:12.1.9=runtimeClasspath,testRuntimeClasspath
47+
org.eclipse.jetty:jetty-security:12.1.9=runtimeClasspath,testRuntimeClasspath
48+
org.eclipse.jetty:jetty-server:12.1.9=runtimeClasspath,testRuntimeClasspath
49+
org.eclipse.jetty:jetty-session:12.1.9=runtimeClasspath,testRuntimeClasspath
50+
org.eclipse.jetty:jetty-util:12.1.9=runtimeClasspath,testRuntimeClasspath
51+
org.hdrhistogram:HdrHistogram:2.2.2=runtimeClasspath,testRuntimeClasspath
52+
org.hypertrace.bom:hypertrace-bom:0.3.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
53+
org.hypertrace.core.serviceframework:platform-metrics:0.1.94=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
54+
org.junit.jupiter:junit-jupiter-api:5.10.0=testCompileClasspath,testRuntimeClasspath
55+
org.junit.jupiter:junit-jupiter-engine:5.10.0=testRuntimeClasspath
56+
org.junit.jupiter:junit-jupiter-params:5.10.0=testCompileClasspath,testRuntimeClasspath
57+
org.junit.jupiter:junit-jupiter:5.10.0=testCompileClasspath,testRuntimeClasspath
58+
org.junit.platform:junit-platform-commons:1.10.0=testCompileClasspath,testRuntimeClasspath
59+
org.junit.platform:junit-platform-engine:1.10.0=testRuntimeClasspath
60+
org.junit:junit-bom:5.10.0=testCompileClasspath,testRuntimeClasspath
61+
org.latencyutils:LatencyUtils:2.0.3=runtimeClasspath,testRuntimeClasspath
62+
org.mockito:mockito-core:5.15.2=testCompileClasspath,testRuntimeClasspath
63+
org.objenesis:objenesis:3.3=testRuntimeClasspath
64+
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
65+
org.projectlombok:lombok:1.18.30=annotationProcessor,compileClasspath
66+
org.slf4j:slf4j-api:2.0.17=runtimeClasspath,testRuntimeClasspath
67+
org.slf4j:slf4j-api:2.0.7=compileClasspath,testCompileClasspath
68+
org.xerial.snappy:snappy-java:1.1.10.5=runtimeClasspath,testRuntimeClasspath
69+
empty=

kafka-streams-framework/build.gradle.kts

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
11
plugins {
22
`java-library`
33
jacoco
4-
id("org.hypertrace.publish-plugin")
5-
id("org.hypertrace.jacoco-report-plugin")
6-
id("org.hypertrace.avro-plugin")
4+
alias(commonLibs.plugins.hypertrace.publish)
5+
alias(commonLibs.plugins.hypertrace.jacoco)
6+
alias(localLibs.plugins.hypertrace.avro)
77
}
88

99
tasks.test {
1010
useJUnitPlatform()
11-
jvmArgs(
12-
"--add-opens=java.base/java.util=ALL-UNNAMED",
13-
"--add-opens=java.base/java.lang=ALL-UNNAMED",
14-
)
1511
}
1612

1713
dependencies {
18-
annotationProcessor("org.projectlombok:lombok:1.18.38")
19-
compileOnly("org.projectlombok:lombok:1.18.38")
14+
annotationProcessor(commonLibs.lombok)
15+
compileOnly(commonLibs.lombok)
2016

2117
api(project(":kafka-streams-serdes"))
2218
api(platform(project(":kafka-bom")))
19+
api(platform(commonLibs.hypertrace.bom))
2320
api("org.apache.kafka:kafka-streams")
24-
api("io.confluent:kafka-streams-avro-serde")
25-
api("org.hypertrace.core.grpcutils:grpc-client-utils:0.13.23")
21+
api(localLibs.kafka.streams.avro.serde)
22+
api(commonLibs.hypertrace.grpcutils.client)
2623

27-
implementation("org.apache.avro:avro")
28-
implementation("org.apache.kafka:kafka-clients")
29-
implementation("org.hypertrace.core.serviceframework:platform-metrics:0.1.94")
30-
implementation("org.hypertrace.core.serviceframework:platform-service-framework:0.1.94")
31-
implementation("org.apache.commons:commons-lang3:3.18.0")
24+
implementation(localLibs.avro)
25+
implementation(commonLibs.kafka.clients)
26+
implementation(commonLibs.hypertrace.framework.metrics.jakarta)
27+
implementation(commonLibs.hypertrace.framework.service.jakarta)
28+
implementation(commonLibs.commons.lang)
3229

33-
testCompileOnly("org.projectlombok:lombok:1.18.38")
34-
testAnnotationProcessor("org.projectlombok:lombok:1.18.38")
35-
testImplementation("org.apache.kafka:kafka-streams-test-utils")
36-
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
37-
testImplementation("org.junit-pioneer:junit-pioneer:2.3.0")
38-
testImplementation("org.mockito:mockito-core:5.15.2")
39-
testImplementation("org.hamcrest:hamcrest-core:2.2")
40-
testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:2.20.0")
30+
testCompileOnly(commonLibs.lombok)
31+
testAnnotationProcessor(commonLibs.lombok)
32+
testImplementation(localLibs.kafka.streams.test.utils)
33+
testImplementation(commonLibs.junit.jupiter)
34+
testImplementation(localLibs.junit.pioneer)
35+
testImplementation(localLibs.mockito.core)
36+
testImplementation(localLibs.hamcrest.core)
37+
testRuntimeOnly(localLibs.log4j.slf4j.impl)
4138
}
4239

4340
// Disabling compatibility check for the test avro definitions.

0 commit comments

Comments
 (0)