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 {
|
2023-10-04 10:12:07 +02:00
|
|
|
jmhImplementation 'org.openjdk.jmh:jmh-core:1.37'
|
|
|
|
jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
|
2021-04-08 22:36:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task jmh(type: JavaExec, group: 'jmh', dependsOn: jmhClasses) {
|
2021-11-25 12:27:39 +01:00
|
|
|
mainClass.set('org.openjdk.jmh.Main')
|
2021-04-08 22:36:40 +02:00
|
|
|
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)
|