summaryrefslogtreecommitdiff
path: root/src/main/groovy/FlycheckAndroidJavaTask.groovy
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-01-10 09:27:10 +0100
committerJoel Klinghed <the_jk@yahoo.com>2017-01-10 09:27:10 +0100
commitdda66db3654576d290783997bebadee05ebfe5f3 (patch)
tree2564c2feab144e960bb56eb33ee4b5db07d3322c /src/main/groovy/FlycheckAndroidJavaTask.groovy
parentb71a31a4ccd4f5113c0bff6bb8bd27e526cec473 (diff)
All the rest
Diffstat (limited to 'src/main/groovy/FlycheckAndroidJavaTask.groovy')
-rw-r--r--src/main/groovy/FlycheckAndroidJavaTask.groovy30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/groovy/FlycheckAndroidJavaTask.groovy b/src/main/groovy/FlycheckAndroidJavaTask.groovy
new file mode 100644
index 0000000..28ca6bb
--- /dev/null
+++ b/src/main/groovy/FlycheckAndroidJavaTask.groovy
@@ -0,0 +1,30 @@
+package org.thejk
+
+import org.gradle.api.DefaultTask
+import org.gradle.api.tasks.TaskAction
+import org.gradle.api.tasks.compile.JavaCompile
+
+class FlycheckAndroidJavaTask extends DefaultTask {
+ FlycheckAndroidJavaTask() {
+ def generate = project.tasks.findByName('generateDebugSources')
+ if (generate) {
+ dependsOn generate
+ }
+ }
+
+ @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
+ }
+ }
+}