Refactor more tasks to lazy API

This commit is contained in:
Ilya Chernikov
2019-08-14 16:05:43 +02:00
parent 2ed8fa7624
commit 315a9d66a0
16 changed files with 42 additions and 48 deletions
+4 -4
View File
@@ -35,7 +35,7 @@ projectTest {
exclude("**/benchmark/**")
}
val compactClasspath by tasks.creating(Jar::class) {
val compactClasspath by tasks.registering(Jar::class) {
archiveAppendix.set("classpath")
inputs.files(sourceSets["main"].runtimeClasspath + sourceSets["test"].runtimeClasspath)
doFirst {
@@ -46,7 +46,7 @@ val compactClasspath by tasks.creating(Jar::class) {
}
}
val jmhBytecode by tasks.creating(JavaExec::class) {
val jmhBytecode by tasks.registering(JavaExec::class) {
tasks["classes"].mustRunAfter(tasks["clean"])
tasks["compactClasspath"].mustRunAfter(tasks["classes"])
dependsOn(tasks["clean"])
@@ -68,14 +68,14 @@ tasks {
}
}
val jmhCompile by tasks.creating(JavaCompile::class) {
val jmhCompile by tasks.registering(JavaCompile::class) {
/*classpath = sourceSets["test"].runtimeClasspath + files("${project.buildDir}/generated-sources/jmh/")
source(fileTree("${project.buildDir}/generated-sources/jmh/"))
destinationDir = file("${project.buildDir}/generated-classes/jmh/")*/
}
val jmhExec by tasks.creating(JavaExec::class) {
val jmhExec by tasks.registering(JavaExec::class) {
dependsOn(tasks["compileTestJava"])
doFirst {
classpath = files(