Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19888

tasks.withType(JavaCompile).findAll doesn't

$
0
0

I have the following task that is of type JavaCompile and I have a list of JavaCompile tasks.

def compileTasks = project.tasks.withType( JavaCompile ).findAll{ task -> ‘compileJsp’ != task.name }

task compileJasperJava(type: JavaCompile)  {
    options.warnings = true
    source = 'build/jasper'
    classpath = compileJava.classpath + project.sourceSets.main.output
    destinationDir = compileJava.destinationDir
    doLast {
      println 'finished precompile compile'
    }
  }
compileTasks.each { compileTask ->
  compileTask.doFirst {
            println "running compileTask with eclipse: " + compileTask.name
  }
}

When I iterate on the compileTasks, the compileJasperJava is not in the list - thoughts? the default compileJava task is part of the list.

Thank you !


Viewing all articles
Browse latest Browse all 19888

Trending Articles