datastructures/gradle/test/jmh.gradle

23 lines
678 B
Groovy
Raw Normal View History

2021-04-08 22:36:40 +02:00
sourceSets {
jmh {
java.srcDirs = ['src/jmh/java']
resources.srcDirs = ['src/jmh/resources']
compileClasspath += sourceSets.main.runtimeClasspath
}
}
dependencies {
jmhImplementation 'org.openjdk.jmh:jmh-core:1.27'
jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.27'
}
task jmh(type: JavaExec, group: 'jmh', dependsOn: jmhClasses) {
main = 'org.openjdk.jmh.Main'
classpath = sourceSets.jmh.compileClasspath + sourceSets.jmh.runtimeClasspath
project.file('build/reports/jmh').mkdirs()
args '-rf', 'json'
args '-rff', project.file('build/reports/jmh/result.json')
}
classes.finalizedBy(jmhClasses)