23 lines
686 B
Groovy
23 lines
686 B
Groovy
|
sourceSets {
|
||
|
jmh {
|
||
|
java.srcDirs = ['src/jmh/java']
|
||
|
resources.srcDirs = ['src/jmh/resources']
|
||
|
compileClasspath += sourceSets.main.runtimeClasspath
|
||
|
}
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
jmhImplementation 'org.openjdk.jmh:jmh-core:1.34'
|
||
|
jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.34'
|
||
|
}
|
||
|
|
||
|
task jmh(type: JavaExec, group: 'jmh', dependsOn: jmhClasses) {
|
||
|
mainClass.set('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)
|