@@ -7,8 +7,8 @@ plugins {
77 id ' me.champeau.jmh' version ' 0.7.3'
88}
99
10- group = ' io.ringbroker'
11- version = ' 0.1.0-SNAPSHOT '
10+ group = ' io.ringbroker'
11+ version = ' 0.0.1-BETA '
1212
1313/* ---------- JVM ---------- */
1414java {
@@ -24,32 +24,28 @@ tasks.withType(JavaCompile).configureEach {
2424 options. encoding = ' UTF-8'
2525}
2626
27- application {
28- // for Gradle 7.1+ use:
29- mainClass. set(" io.ringbroker.BrokerMain" )
30- }
31-
32- /* ---------- Repos & Versions ---------- */
33- repositories { mavenCentral() }
34-
35- ext {
36- grpcVersion = ' 1.72.0'
37- protobufVersion = ' 3.25.7'
38- jacksonVersion = ' 2.19.0'
39- picocliVersion = ' 4.7.7'
27+ /* ---------- Repos & Versions ---------- */
28+ repositories { mavenCentral() }
29+
30+ ext {
31+ grpcVersion = ' 1.72.0'
32+ protobufVersion = ' 3.25.7'
33+ jacksonVersion = ' 2.19.0'
34+ picocliVersion = ' 4.7.7'
4035 nettyVersion = ' 4.2.1.Final'
41- jmhVersion = ' 1.37'
42- slf4jVersion = ' 2.0.17'
43- jupiterVersion = ' 5.12.2'
44- junitPlatformVersion = ' 1.12.2' // Added matching platform version
45- annotationVersion = ' 1.3.2'
46- }
47-
48- /* ---------- Dependencies ---------- */
49- dependencies {
50- // gRPC and Protobuf
51- implementation " io.grpc:grpc-netty-shaded:$grpcVersion "
52- implementation " io.grpc:grpc-stub:$grpcVersion "
36+ jmhVersion = ' 1.37'
37+ slf4jVersion = ' 2.0.17'
38+ jupiterVersion = ' 5.12.2'
39+ junitPlatformVersion = ' 1.12.2' // Added matching platform version
40+ annotationVersion = ' 1.3.2'
41+ testcontainersVersion = ' 1.20.3'
42+ }
43+
44+ /* ---------- Dependencies ---------- */
45+ dependencies {
46+ // gRPC and Protobuf
47+ implementation " io.grpc:grpc-netty-shaded:$grpcVersion "
48+ implementation " io.grpc:grpc-stub:$grpcVersion "
5349 implementation " io.grpc:grpc-protobuf:$grpcVersion "
5450 implementation " com.google.protobuf:protobuf-java:$protobufVersion "
5551 implementation " io.netty:netty-all:$nettyVersion "
@@ -69,15 +65,18 @@ dependencies {
6965 // SLF4J API (you can choose a backend like logback)
7066 implementation " org.slf4j:slf4j-api:$slf4jVersion "
7167 runtimeOnly " org.slf4j:slf4j-simple:$slf4jVersion "
72-
73- // JUnit 5
74- testImplementation " org.junit.jupiter:junit-jupiter:$jupiterVersion "
75- testImplementation " org.junit.platform:junit-platform-launcher:$junitPlatformVersion "
76-
77- compileOnly " javax.annotation:javax.annotation-api:$annotationVersion "
78-
79- // JMH dependencies
80- jmh " org.openjdk.jmh:jmh-core:${ jmhVersion} "
68+
69+ // JUnit 5
70+ testImplementation " org.junit.jupiter:junit-jupiter:$jupiterVersion "
71+ testImplementation " org.junit.platform:junit-platform-launcher:$junitPlatformVersion "
72+ testImplementation platform(" org.testcontainers:testcontainers-bom:$testcontainersVersion " )
73+ testImplementation " org.testcontainers:junit-jupiter"
74+ testImplementation " org.testcontainers:testcontainers"
75+
76+ compileOnly " javax.annotation:javax.annotation-api:$annotationVersion "
77+
78+ // JMH dependencies
79+ jmh " org.openjdk.jmh:jmh-core:${ jmhVersion} "
8180 jmh " org.openjdk.jmh:jmh-generator-annprocess:${ jmhVersion} "
8281}
8382
@@ -95,26 +94,28 @@ protobuf {
9594}
9695
9796/* ---------- Application entry‑point ---------- */
98- application {
99- mainClass = ' io.ringbroker.BrokerMain'
100- }
101-
102- /* ---------- Tests ---------- */
103- test {
104- useJUnitPlatform()
105- jvmArgs ' --enable-preview'
106- }
97+ application {
98+ mainClass = ' io.ringbroker.Application'
99+ }
100+
101+ /* ---------- Tests ---------- */
102+ test {
103+ useJUnitPlatform()
104+ jvmArgs ' --enable-preview'
105+ // Fat jar is required for the Testcontainers-based cluster integration test.
106+ dependsOn tasks. named(' shadowJar' )
107+ }
107108
108109/* ---------- Jar manifest ---------- */
109- jar {
110- manifest {
111- attributes(
112- ' Implementation-Title' : ' RingBroker' ,
113- ' Implementation-Version' : version,
114- ' Main-Class' : application. mainClass
115- )
116- }
117- }
110+ jar {
111+ manifest {
112+ attributes(
113+ ' Implementation-Title' : ' RingBroker' ,
114+ ' Implementation-Version' : version,
115+ ' Main-Class' : application. mainClass. get()
116+ )
117+ }
118+ }
118119
119120/* ---------- JMH Configuration ---------- */
120121jmh {
0 commit comments