Skip to content
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
49 changes: 27 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
max-parallel: 100
matrix:
spring_boot_version:
- 3.4.6
- 3.5.0
- 4.0.6
env:
SPRING_BOOT_VERSION: ${{ matrix.spring_boot_version }}
GRADLE_OPTS: "-Djava.security.egd=file:/dev/./urandom -Dorg.gradle.parallel=true"
Expand Down Expand Up @@ -52,29 +51,35 @@ jobs:
ALLOW_ANONYMOUS_LOGIN: "yes"
JVMFLAGS: "-Xmx512m -Xms64m"
kafka1:
image: wurstmeister/kafka:2.12-2.2.0
image: bitnamilegacy/kafka:3.6.0
env:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181/kafka1
KAFKA_LISTENERS: PLAINTEXT://:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_MESSAGE_MAX_BYTES: "10485760"
KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 20000
KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: "true"
KAFKA_LEADER_IMBALANCE_CHECK_INTERVAL_SECONDS: 5
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_CFG_BROKER_ID: 1
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper1:2181/kafka1
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka1:9092
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_MESSAGE_MAX_BYTES: "10485760"
KAFKA_CFG_ZOOKEEPER_SESSION_TIMEOUT_MS: 20000
KAFKA_CFG_UNCLEAN_LEADER_ELECTION_ENABLE: "true"
KAFKA_CFG_LEADER_IMBALANCE_CHECK_INTERVAL_SECONDS: 5
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_HEAP_OPTS: -Xms256m -Xmx768m
kafka2:
image: wurstmeister/kafka:2.12-2.2.0
image: bitnamilegacy/kafka:3.6.0
env:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181/kafka2
KAFKA_LISTENERS: PLAINTEXT://:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_MESSAGE_MAX_BYTES: "10485760"
KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 20000
KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: "true"
KAFKA_LEADER_IMBALANCE_CHECK_INTERVAL_SECONDS: 5
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_CFG_BROKER_ID: 1
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper1:2181/kafka2
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka2:9092
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_MESSAGE_MAX_BYTES: "10485760"
KAFKA_CFG_ZOOKEEPER_SESSION_TIMEOUT_MS: 20000
KAFKA_CFG_UNCLEAN_LEADER_ELECTION_ENABLE: "true"
KAFKA_CFG_LEADER_IMBALANCE_CHECK_INTERVAL_SECONDS: 5
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_HEAP_OPTS: -Xms256m -Xmx768m
steps:
- name: "Install packages"
# We do some changes as the main ubuntu repo is currently very slow.
Expand Down
6 changes: 5 additions & 1 deletion build.common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dependencies {
}

java {
if (springBootVersion.startsWith("3.")) {
if (springBootVersion.startsWith("3.") || springBootVersion.startsWith("4.")) {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
} else {
Expand All @@ -84,6 +84,10 @@ java {
}
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
}
}

compileJava {
Expand Down
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import com.github.spotbugs.snom.Effort
import org.eclipse.jgit.api.errors.RefAlreadyExistsException

buildscript {
repositories {
google()
mavenCentral()
}
if (!project.hasProperty("springBootVersion")) {
ext.springBootVersion = System.getenv("SPRING_BOOT_VERSION") ?: "3.4.6"
ext.springBootVersion = System.getenv("SPRING_BOOT_VERSION") ?: "4.0.6"
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4'
Expand All @@ -15,11 +19,11 @@ buildscript {
plugins {
id 'idea'
id 'org.springframework.boot' version "$springBootVersion" apply false
id "com.github.spotbugs" version "6.0.2"
id "com.github.spotbugs" version "6.5.5"
id "at.zierler.yamlvalidator" version "1.5.0"
id 'org.ajoberstar.grgit' version '5.2.1'
id 'io.github.gradle-nexus.publish-plugin' version "1.3.0"
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'com.gradleup.shadow' version '9.4.2' apply false
}

idea.project {
Expand All @@ -29,6 +33,7 @@ idea.project {
}

spotbugs {
toolVersion = '4.9.8'
effort = Effort.valueOf('MAX')
reportLevel = Confidence.valueOf('DEFAULT')
}
Expand Down
9 changes: 6 additions & 3 deletions build.libraries.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ext {
protobufVersion = "3.24.0"
springBootVersion = "${System.getenv("SPRING_BOOT_VERSION") ?: '3.4.6'}"
springBootVersion = "${System.getenv("SPRING_BOOT_VERSION") ?: '4.0.6'}"
libraries = [
// version defined
awaitility : 'org.awaitility:awaitility:4.2.0',
Expand All @@ -11,7 +11,7 @@ ext {
jakartaValidationApi : 'jakarta.validation:jakarta.validation-api:3.0.2',
javaxValidationApi : "javax.validation:validation-api:2.0.1.Final",
kafkaStreams : 'org.apache.kafka:kafka-streams:3.2.3',
lz4Java : 'org.lz4:lz4-java:1.8.0',
lz4Java : 'at.yawk.lz4:lz4-java:1.10.1',
protobufJava : "com.google.protobuf:protobuf-java:${protobufVersion}",
semver4j : "com.vdurmont:semver4j:3.1.0",
snappyJava : 'org.xerial.snappy:snappy-java:1.1.10.5',
Expand All @@ -32,14 +32,17 @@ ext {
flywayCore : 'org.flywaydb:flyway-core',
flywayMysql : 'org.flywaydb:flyway-mysql',
flywayPostgresql : 'org.flywaydb:flyway-database-postgresql',
jacksonDatabind : 'com.fasterxml.jackson.core:jackson-databind',
jacksonDatabind : 'tools.jackson.core:jackson-databind',
kafkaClients : 'org.apache.kafka:kafka-clients',
lombok : 'org.projectlombok:lombok',
mariadbJavaClient : 'org.mariadb.jdbc:mariadb-java-client',
micrometerCore : 'io.micrometer:micrometer-core',
micrometerRegistryPrometheus : 'io.micrometer:micrometer-registry-prometheus',
postgresql : 'org.postgresql:postgresql',
springBootConfigurationProcessor: 'org.springframework.boot:spring-boot-configuration-processor',
springBootFlyway : 'org.springframework.boot:spring-boot-flyway',
springBootKafka : 'org.springframework.boot:spring-boot-kafka',
springBootValidation : 'org.springframework.boot:spring-boot-validation',
springBootStarter : 'org.springframework.boot:spring-boot-starter',
springBootStarterActuator : 'org.springframework.boot:spring-boot-starter-actuator',
springBootStarterJdbc : 'org.springframework.boot:spring-boot-starter-jdbc',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.transferwise.kafka.tkms.demoapp.complextest;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.transferwise.kafka.tkms.api.ITransactionalKafkaMessageSender;
import com.transferwise.kafka.tkms.api.ITransactionalKafkaMessageSender.SendMessageResult;
import com.transferwise.kafka.tkms.api.TkmsMessage;
Expand All @@ -10,6 +9,7 @@
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import tools.jackson.databind.ObjectMapper;

@RestController
public class ComplexTestController {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.transferwise.kafka.tkms.demoapp.complextest;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.transferwise.common.baseutils.ExceptionUtils;
import java.sql.PreparedStatement;
import java.sql.SQLException;
Expand All @@ -13,6 +12,7 @@
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
import tools.jackson.databind.ObjectMapper;

@Slf4j
@Component
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 4 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
33 changes: 18 additions & 15 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 22 additions & 32 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
java = "temurin-25"
Loading
Loading