| import org.gradle.internal.jvm.Jvm |
| |
| /* |
| * 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 'java' } |
| |
| group 'org.apache.geode-benchmark' |
| version '1.0-SNAPSHOT' |
| |
| def geodeVersion = project.hasProperty('geodeVersion') ? project.findProperty('geodeVersion') : '1.+' |
| def isCI = project.hasProperty('ci') ? project.findProperty('ci') : 0 |
| |
| repositories { |
| /* |
| This is used in CI to benchmark various new/old versions of Geode. |
| Also useful in dev where you can clone geode and publishToMavenLocal |
| */ |
| mavenLocal() |
| // fall back to mavenCentral, which has lots of released versions of Geode |
| mavenCentral() |
| } |
| |
| task(dumpRun, dependsOn: 'classes', type: JavaExec) { |
| main = 'org.apache.geode.perftest.analysis.DumpResults' |
| workingDir = project.findProperty("dumpWorkingDir") ?: rootDir |
| classpath = sourceSets.main.runtimeClasspath |
| } |
| |
| task(analyzeRun, dependsOn: 'classes', type: JavaExec) { |
| main = 'org.apache.geode.perftest.analysis.Analyzer' |
| workingDir = rootDir |
| classpath = sourceSets.main.runtimeClasspath |
| systemProperty 'TEST_CI', isCI |
| } |
| |
| dependencies { |
| compile(group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: project.'junit-jupiter.version') |
| compile(group: 'org.junit-pioneer', name: 'junit-pioneer', version: project.'junit-pioneer.version') |
| compile(group: 'com.hierynomus', name: 'sshj', version: project.'sshj.version') |
| compile(group: 'commons-io', name: 'commons-io', version: project.'commons-io.version') |
| compile(group: 'org.yardstickframework', name: 'yardstick', version: project.'yardstick.version') |
| compile(group: 'org.hdrhistogram', name: 'HdrHistogram', version: project.'HdrHistogram.version') |
| compile(group: 'org.apache.geode', name: 'geode-core', version: geodeVersion) |
| testCompile(group: 'org.mockito', name: 'mockito-core', version: project.'mockito.version') |
| testCompile(group: 'org.awaitility', name: 'awaitility', version: project.'awaitility.version') |
| testCompile(group: 'org.slf4j', name: 'slf4j-simple', version: project.'slf4j-simple.version') |
| testCompile(group: 'org.apache.sshd', name: 'sshd-core', version: project.'sshd-core.version') |
| testCompile(group: 'org.assertj', name: 'assertj-core', version: project.'assertj-core.version') |
| } |
| |
| compileJava { |
| options.fork = true |
| options.forkOptions.executable = 'javac' |
| options.compilerArgs << '-XDignore.symbol.file' << '-Xlint:unchecked' << "-Werror" |
| options.deprecation = true |
| } |
| |
| test{ useJUnitPlatform() } |