summaryrefslogtreecommitdiff
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
parentc5773e2906c3c53a004b63a0b8d0eedee80498e2 (diff)
Add test target as well
-rw-r--r--build.gradle2
-rw-r--r--src/main/groovy/FlycheckAndroidJavaTask.groovy26
2 files changed, 16 insertions, 12 deletions
diff --git a/build.gradle b/build.gradle
index 0d7c7f1..8a1b3aa 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,7 +8,7 @@ dependencies {
apply plugin: 'maven'
group = 'org.thejk'
-version = '0.3.2'
+version = '0.3.3'
uploadArchives {
repositories {
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
+ }
}
}
}