/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

def grpcVersion = '1.68.0'

dependencies {
    api(project(":eventmesh-common")) {
        // Remove logging backend implementations to allow users to choose their own
        exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
        exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j2-impl'
    }

    implementation "com.fasterxml.jackson.core:jackson-databind"
    implementation "com.fasterxml.jackson.core:jackson-core"
    implementation "com.fasterxml.jackson.core:jackson-annotations"
    implementation "org.apache.commons:commons-collections4"

    implementation "io.netty:netty-all"
    implementation "org.apache.httpcomponents:httpclient"

    implementation "io.grpc:grpc-protobuf:${grpcVersion}"
    implementation "io.grpc:grpc-stub:${grpcVersion}"
    implementation "io.grpc:grpc-netty:${grpcVersion}"
    implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
    implementation "io.cloudevents:cloudevents-protobuf"

    // protocol
    api "io.cloudevents:cloudevents-core"
    api "io.cloudevents:cloudevents-json-jackson"
    api "io.openmessaging:openmessaging-api"

    testImplementation project(":eventmesh-common")

    testImplementation "com.fasterxml.jackson.core:jackson-databind"
    testImplementation "com.fasterxml.jackson.core:jackson-core"
    testImplementation "com.fasterxml.jackson.core:jackson-annotations"

    testImplementation "io.netty:netty-all"
    testImplementation "org.apache.httpcomponents:httpclient"

    implementation "io.grpc:grpc-protobuf:${grpcVersion}"
    implementation "io.grpc:grpc-stub:${grpcVersion}"
    implementation "com.google.protobuf:protobuf-java-util:3.25.4"
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'

    testCompileOnly 'org.projectlombok:lombok'
    testAnnotationProcessor 'org.projectlombok:lombok'

    testImplementation "org.assertj:assertj-core"

    testImplementation "org.mockito:mockito-inline"
    testImplementation "org.mockito:mockito-junit-jupiter"
}
