diff options
Diffstat (limited to 'src/main/groovy/FlycheckAndroidJavaTask.groovy')
| -rw-r--r-- | src/main/groovy/FlycheckAndroidJavaTask.groovy | 30 |
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 + } + } +} |
