summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--build.gradle2
-rw-r--r--src/main/groovy/FlycheckAndroidJavaTask.groovy12
3 files changed, 8 insertions, 8 deletions
diff --git a/README b/README
index 4cb9ab1..87547ab 100644
--- a/README
+++ b/README
@@ -44,7 +44,7 @@ initscript {
}
}
dependencies {
- classpath 'org.thejk:flycheck-android-experimental:0.3.2'
+ classpath 'org.thejk:flycheck-android-experimental:0.3.4'
}
}
diff --git a/build.gradle b/build.gradle
index 8a1b3aa..b2ee96d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,7 +8,7 @@ dependencies {
apply plugin: 'maven'
group = 'org.thejk'
-version = '0.3.3'
+version = '0.3.4'
uploadArchives {
repositories {
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
}
- }
}
}