blob: 494a886c3b673dcc353430afd7f7decf9c571404 [file] [log] [blame]
/*
* 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.
*/
import java.nio.file.Paths
plugins {
id('java-library')
id('idea')
id('maven-publish')
}
group 'org.apache.cassandra.sidecar'
version project.version
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
reports {
junitXml.enabled = true
def destDir = Paths.get(rootProject.rootDir.absolutePath, "build", "test-results", "vertx-client").toFile()
println("Destination directory for vertx-client tests: ${destDir}")
junitXml.destination = destDir
html.enabled = true
}
}
configurations {
all*.exclude(group: 'ch.qos.logback')
}
dependencies {
api(project(':client'))
api(group: 'io.vertx', name: 'vertx-web-client', version: "${project.vertxVersion}") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
}
implementation(group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.61.Final') // for openSSL
// The newer versions (2.0.48.Final+) of tcnative require explicit dependency declarations,
// including the classifiers. See https://netty.io/wiki/forked-tomcat-native.html#gradle-and-bazel
// for details.
// openSSL native libraries for linux x86-64 architectures
implementation(group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.61.Final', classifier: 'linux-x86_64')
// openSSL native libraries for macOS aarch-64 architectures
implementation(group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.61.Final', classifier: 'osx-aarch_64')
// openSSL native libraries for linux aarch-64 architectures
implementation(group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.61.Final', classifier: 'linux-aarch_64')
// openSSL native libraries for macOS x86-64 architectures
implementation(group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.61.Final', classifier: 'osx-x86_64')
implementation("org.slf4j:slf4j-api:${project.slf4jVersion}")
compileOnly('org.jetbrains:annotations:23.0.0')
testImplementation(testFixtures(project(':client')))
testImplementation("io.vertx:vertx-junit5:${project.vertxVersion}")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:${project.junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${project.junitVersion}")
testImplementation("com.squareup.okhttp3:mockwebserver:4.10.0")
testImplementation('org.mockito:mockito-core:4.10.0')
// logging dependencies for tests
testImplementation("org.apache.logging.log4j:log4j-api:2.20.0")
testImplementation("org.apache.logging.log4j:log4j-core:2.20.0")
testImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.20.0")
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId project.group
artifactId "${archivesBaseName}"
version System.getenv("CODE_VERSION") ?: "${version}"
}
}
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
check.dependsOn(checkstyleMain, checkstyleTest, jacocoTestReport)