/*
 * 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.
 */

apply from: "$rootDir/buildscripts/java-core.gradle"
apply from: "$rootDir/buildscripts/publishing.gradle"
apply from: "$rootDir/buildscripts/java-junit5.gradle"

dependencies {
    api project(':ignite-api')
    implementation project(':ignite-core')
    implementation project(':ignite-binary-tuple')
    implementation project(':ignite-client-common')
    implementation project(':ignite-marshaller-common')
    implementation project(':ignite-metrics')
    implementation project(':ignite-catalog-dsl')

    implementation libs.jetbrains.annotations
    implementation libs.msgpack.core
    implementation libs.netty.common
    implementation libs.netty.buffer
    implementation libs.netty.codec
    implementation libs.netty.handler
    implementation libs.auto.service.annotations
    implementation libs.caffeine

    annotationProcessor libs.auto.service

    testAnnotationProcessor libs.jmh.annotation.processor
    testImplementation project(':ignite-client-handler')
    testImplementation project(':ignite-configuration')
    testImplementation project(':ignite-configuration-root')
    testImplementation project(':ignite-sql-engine-api')
    testImplementation project(':ignite-schema')
    testImplementation project(':ignite-table')
    testImplementation project(':ignite-network')
    testImplementation project(':ignite-raft-api')
    testImplementation project(':ignite-transactions')
    testImplementation project(':ignite-storage-api')
    testImplementation project(':ignite-security')
    testImplementation project(':ignite-metrics')
    testImplementation project(':ignite-catalog')
    testImplementation project(':ignite-placement-driver-api')
    testImplementation project(':ignite-cluster-management')
    testImplementation project(':ignite-compute')
    testImplementation project(':ignite-code-deployment')
    testImplementation project(':ignite-eventlog')
    testImplementation testFixtures(project(':ignite-api'))
    testImplementation testFixtures(project(':ignite-core'))
    testImplementation testFixtures(project(':ignite-configuration'))
    testImplementation testFixtures(project(':ignite-sql-engine'))
    testImplementation testFixtures(project(':ignite-table'))
    testImplementation testFixtures(project(':ignite-client-handler'))
    testImplementation testFixtures(project(':ignite-low-watermark'))
    testImplementation testFixtures(project(':ignite-schema'))
    testImplementation libs.archunit.core
    testImplementation libs.archunit.junit5
    testImplementation libs.jmh.core
}

def archTestDir = "$buildDir/archtest"

task copyMainClassPathToArchTestDir(type: Copy) {
    from sourceSets.main.runtimeClasspath
    into archTestDir
}

test {
    systemProperty "archtest.dir", archTestDir
}

test.dependsOn copyMainClassPathToArchTestDir

description = 'ignite-client'
