From 0e8701f46dc29912f1bbc0b460f47e7802eb572a Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 23 Mar 2017 15:42:40 +0100 Subject: Add test target as well --- src/main/groovy/FlycheckAndroidJavaTask.groovy | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/main/groovy') diff --git a/src/main/groovy/FlycheckAndroidJavaTask.groovy b/src/main/groovy/FlycheckAndroidJavaTask.groovy index 28ca6bb..4984d69 100644 --- a/src/main/groovy/FlycheckAndroidJavaTask.groovy +++ b/src/main/groovy/FlycheckAndroidJavaTask.groovy @@ -14,17 +14,21 @@ class FlycheckAndroidJavaTask extends DefaultTask { @TaskAction def action() { - def compile = project.tasks.findByName('compileDebugJavaWithJavac') - if (compile instanceof JavaCompile) { - println '***' - println 'args=' + compile.options.compilerArgs - println 'encoding=' + compile.options.encoding - println 'bootcp=' + compile.options.bootClasspath - println 'cp=' + compile.classpath.asPath - println 'source=' + compile.sourceCompatibility - println 'target=' + compile.targetCompatibility - println 'files=' + compile.inputs.files.asPath - println 'output=' + compile.destinationDir + def tasks = ['compileDebugJavaWithJavac', + 'compileDebugUnitTestJavaWithJavac'] + for (String task : tasks) { + def compile = project.tasks.findByName(task) + if (compile instanceof JavaCompile) { + println '***' + println 'args=' + compile.options.compilerArgs + println 'encoding=' + compile.options.encoding + println 'bootcp=' + compile.options.bootClasspath + println 'cp=' + compile.classpath.asPath + println 'source=' + compile.sourceCompatibility + println 'target=' + compile.targetCompatibility + println 'files=' + compile.inputs.files.asPath + println 'output=' + compile.destinationDir + } } } } -- cgit v1.2.3-70-g09d2