| /* |
| * 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 "java-test-fixtures" |
| id 'idea' |
| id 'maven-publish' |
| |
| // todo move to all projects or subprojects. possibly only include with java projects |
| id 'jacoco' |
| id "com.github.spotbugs" |
| } |
| |
| 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", "client-common").toFile() |
| println("Destination directory for client-common tests: ${destDir}") |
| junitXml.destination = destDir |
| html.enabled = true |
| } |
| } |
| |
| dependencies { |
| compileOnly(group: 'org.slf4j', name: 'slf4j-api', version: "${project.slf4jVersion}") |
| compileOnly(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${project.jacksonVersion}") |
| compileOnly(group: 'org.jetbrains', name: 'annotations', version: '23.0.0') |
| compileOnly(group: 'io.netty', name: 'netty-codec-http', version: '4.1.69.Final') |
| compileOnly(group: 'com.google.guava', name: 'guava', version: "${project.guavaVersion}") |
| |
| testImplementation(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${project.jacksonVersion}") |
| testImplementation("com.google.guava:guava:${project.guavaVersion}") |
| testImplementation('org.mockito:mockito-inline:4.10.0') |
| 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(group: 'io.netty', name: 'netty-codec-http', version: '4.1.69.Final') |
| testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${project.junitVersion}") |
| } |
| |
| 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) |
| } |
| } |