summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/groovy/FlycheckAndroidJavaTask.groovy12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/groovy/FlycheckAndroidJavaTask.groovy b/src/main/groovy/FlycheckAndroidJavaTask.groovy
index 4984d69..e5fd985 100644
--- a/src/main/groovy/FlycheckAndroidJavaTask.groovy
+++ b/src/main/groovy/FlycheckAndroidJavaTask.groovy
@@ -14,11 +14,12 @@ class FlycheckAndroidJavaTask extends DefaultTask {
@TaskAction
def action() {
- def tasks = ['compileDebugJavaWithJavac',
- 'compileDebugUnitTestJavaWithJavac']
- for (String task : tasks) {
- def compile = project.tasks.findByName(task)
- if (compile instanceof JavaCompile) {
+ project.tasks.matching({ task ->
+ if (!(task instanceof JavaCompile)) false
+ return task.name.startsWith('compile') &&
+ (task.name.endsWith('DebugJavaWithJavac') ||
+ task.name.endsWith('DebugUnitTestJavaWithJavac'))
+ }).each { compile ->
println '***'
println 'args=' + compile.options.compilerArgs
println 'encoding=' + compile.options.encoding
@@ -29,6 +30,5 @@ class FlycheckAndroidJavaTask extends DefaultTask {
println 'files=' + compile.inputs.files.asPath
println 'output=' + compile.destinationDir
}
- }
}
}