melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
676 stars 87 forks source link

Support JMH Betchmarks writtent in Scala in Intellij Idea #102

Open szhem opened 7 years ago

szhem commented 7 years ago

Currently plugin configures IntelliJ Idea only from java source sets

 project.idea {
   module {
     project.sourceSets.jmh.java.srcDirs.each {
       testSourceDirs += project.file(it)
     }
   }
}

... this means, that benchmark sources written in scala and located in src/jmh/scala directory will not be picked up by IDE correctly

I believe that it should be enough to modify the snippet of IDE configuration as the following

 project.idea {
   module {
     project.sourceSets.jmh.java.srcDirs.each {
       testSourceDirs += project.file(it)
     }
     project.sourceSets.jmh.scala.srcDirs.each {
       testSourceDirs += project.file(it)
     }
   }
}

... to support scala benchmarks as well as java ones