| /* |
| * 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. |
| */ |
| |
| plugins { |
| id 'accord.java-conventions' |
| // export test classes for subprojects |
| id 'java-library' |
| id 'java-test-fixtures' |
| id 'maven-publish' |
| } |
| |
| java { |
| withJavadocJar() |
| withSourcesJar() |
| } |
| |
| dependencies { |
| implementation group: 'org.apache.cassandra', name: 'cassandra-all', version: '4.1-alpha1' |
| implementation group: "net.ju-n.compile-command-annotations", name: "compile-command-annotations", version: "1.2.0" |
| |
| // Dependencies we depend on that are not part of our API. |
| // These act as runtimeOnly dependencies to users |
| implementation 'org.slf4j:slf4j-api:1.7.36' |
| implementation 'org.agrona:agrona:1.17.1' |
| } |
| |
| task burn(type: JavaExec) { |
| classpath sourceSets.main.runtimeClasspath, sourceSets.test.output |
| main = 'accord.burn.BurnTest' |
| jvmArgs '-Dlogback.configurationFile=burn-logback.xml' |
| args = ['-c', '1'] |
| } |
| |
| // the team is used to 'install' so make sure that still publishes locally |
| task install(dependsOn: publishToMavenLocal) |
| task testJar(type: Jar, dependsOn: testClasses) { |
| archiveClassifier = 'tests' |
| from sourceSets.test.output |
| } |
| |
| publishing { |
| publications { |
| mavenJava(MavenPublication) { |
| artifactId = 'accord' |
| pom { |
| inceptionYear = '2021' |
| } |
| from components.java |
| } |
| |
| test(MavenPublication) { |
| artifactId = 'accord' |
| artifact testJar |
| } |
| } |
| } |
| |
| task burnforkloop { |
| doLast { |
| (project.hasProperty('burnTimes') ? Integer.parseInt(project.getProperty('burnTimes')) : Integer.MAX_VALUE) |
| .times { |
| javaexec { |
| classpath sourceSets.main.runtimeClasspath, sourceSets.test.output |
| main = 'accord.burn.BurnTest' |
| jvmArgs '-Dlogback.configurationFile=burn-logback.xml' |
| args = ['-c', '1'] |
| } |
| } |
| } |
| } |
| |
| task burnloop { |
| doLast { |
| javaexec { |
| classpath sourceSets.main.runtimeClasspath, sourceSets.test.output |
| main = 'accord.burn.BurnTest' |
| jvmArgs '-Dlogback.configurationFile=burn-logback.xml' |
| args = ['-c', project.hasProperty('burnTimes') ? project.getProperty('burnTimes') : '1000000'] |
| } |
| } |
| } |
| |
| tasks { |
| javadoc { |
| options { addStringOption("Xdoclint:none", "-quiet") } |
| } |
| } |
| |