summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2017-03-23 15:42:40 +0100
committerJoel Klinghed <the_jk@opera.com>2017-03-23 15:42:40 +0100
commit0e8701f46dc29912f1bbc0b460f47e7802eb572a (patch)
tree4e513335e85d9e1884e1c5b33a0ee1cbff26c0f2 /src
parentc5773e2906c3c53a004b63a0b8d0eedee80498e2 (diff)
Add test target as well
Diffstat (limited to 'src')
-rw-r--r--src/main/groovy/FlycheckAndroidJavaTask.groovy26
1 files changed, 15 insertions, 11 deletions
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
+ }
}
}
}