Skip to content

Commit

Permalink
depend on json core not serde (#512)
Browse files Browse the repository at this point in the history
* use kotlin DSL

* no need to import micronaut-logging catalogue

* depend on json.core not serde

* annotate with @requires(JsonMapper.class)
  • Loading branch information
sdelamo authored Aug 2, 2023
1 parent 3edcd93 commit 4b6016c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 38 deletions.
37 changes: 0 additions & 37 deletions rabbitmq/build.gradle

This file was deleted.

40 changes: 40 additions & 0 deletions rabbitmq/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat

plugins {
id("io.micronaut.build.internal.rabbitmq-module")
}

dependencies {
compileOnly(libs.jsr305)

api(mn.micronaut.messaging)
api(mn.micronaut.inject)
api(libs.managed.amqp.client)

implementation(mn.micronaut.json.core)

implementation(mn.micronaut.retry)
implementation(mn.reactor)
implementation(libs.caffeine)

compileOnly(mn.micronaut.management)
compileOnly(mnMicrometer.micronaut.micrometer.core)

testImplementation(mnSerde.micronaut.serde.jackson)
testImplementation(libs.testcontainers.spock)
testImplementation(mn.micronaut.inject.groovy)
testImplementation(mn.micronaut.inject.java)
testImplementation(mn.micronaut.management)
testImplementation(mnTest.micronaut.test.spock)
testImplementation(mnMicrometer.micronaut.micrometer.core) {
exclude("io.micronaut.reactor", "micronaut-reactor")
}
testRuntimeOnly(mnLogging.logback.classic)
}

tasks {
named<Test>("test") {
testLogging.showStandardStreams = true
testLogging.exceptionFormat = TestExceptionFormat.FULL
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package io.micronaut.rabbitmq.serdes;

import io.micronaut.context.annotation.Requires;
import io.micronaut.core.reflect.ClassUtils;
import io.micronaut.core.serialize.exceptions.SerializationException;
import io.micronaut.core.type.Argument;
Expand All @@ -32,6 +33,7 @@
* @author James Kleeh
* @since 1.1.0
*/
@Requires(bean = JsonMapper.class)
@Singleton
public class JsonRabbitMessageSerDes implements RabbitMessageSerDes<Object> {

Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ include 'docs-examples:example-kotlin'
enableFeaturePreview 'TYPESAFE_PROJECT_ACCESSORS'

micronautBuild {
importMicronautCatalog("micronaut-logging")
useStandardizedProjectNames=true
importMicronautCatalog()
importMicronautCatalog("micronaut-micrometer")
Expand Down

0 comments on commit 4b6016c

Please sign in to comment.