diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d50fa9..668491c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,7 @@ version: 2.1 orbs: + # eventuate-gradle-build-and-test: "eventuate_io/eventuate-gradle-build-and-test@0.2.1" + # Some features unsupported by above ORB e.g. set-multi-arch-image-env-vars.sh build-and-test: jobs: build-and-test: diff --git a/build.gradle b/build.gradle index ee6f72a..832f227 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { eventuateMavenRepoUrl.split(',').each { repoUrl -> maven { url repoUrl } } } dependencies { - classpath "com.avast.gradle:gradle-docker-compose-plugin:0.13.2" + classpath "com.avast.gradle:gradle-docker-compose-plugin:0.12.0" classpath "io.eventuate.plugins.gradle:eventuate-plugins-gradle-publish:$eventuatePluginsGradleVersion" } } @@ -29,11 +29,10 @@ subprojects { eventuateMavenRepoUrl.split(',').each { repoUrl -> maven { url repoUrl } } } - dependencies { - testCompile "junit:junit:4.12" - } - - + if (!project.name.endsWith("-bom")) + dependencies { + testCompile "junit:junit:4.12" + } } gradle.projectsEvaluated { diff --git a/eventuate-messaging-kafka-consumer/src/main/java/io/eventuate/messaging/kafka/consumer/MessageConsumerKafkaImpl.java b/eventuate-messaging-kafka-consumer/src/main/java/io/eventuate/messaging/kafka/consumer/MessageConsumerKafkaImpl.java index 798eb29..37a99a8 100644 --- a/eventuate-messaging-kafka-consumer/src/main/java/io/eventuate/messaging/kafka/consumer/MessageConsumerKafkaImpl.java +++ b/eventuate-messaging-kafka-consumer/src/main/java/io/eventuate/messaging/kafka/consumer/MessageConsumerKafkaImpl.java @@ -96,10 +96,13 @@ private void handle(RawKafkaMessage message, BiConsumer callbac try { kafkaMessageHandler .apply(new KafkaMessage(EventuateBinaryMessageEncoding.bytesToString(message.getPayload()))) - .whenComplete(callback); - } catch (Throwable e) { + .get(); + } catch (RuntimeException e) { callback.accept(null, e); throw e; + } catch (Throwable e) { + callback.accept(null, e); + throw new RuntimeException(e); } } diff --git a/gradle.properties b/gradle.properties index b964f2c..8afed6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,5 @@ -org.gradle.jvmargs=-XX:MaxPermSize=512m deployUrl=file:///Users/cer/.m2/testdeploy -bintrayRepoType=defineMe - -bintrayPkgName=eventuate-messaging-kafka -bintrayPkgVcsUrl=https://github.com/eventuate-foundation/eventuate-messaging-kafka eventuateMavenRepoUrl=file:///Users/cer/.m2/testdeploy,https://snapshots.repositories.eventuate.io/repository diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fa0aa69..a33a987 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-6.8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip diff --git a/settings.gradle b/settings.gradle index de61e52..ace4c5e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -15,3 +15,4 @@ include 'eventuate-messaging-kafka-micronaut-producer' include 'eventuate-messaging-kafka-integration-test' include 'eventuate-messaging-kafka-spring-integration-test' include 'eventuate-messaging-kafka-micronaut-integration-test' +include 'eventuate-messaging-kafka-bom'