gradle-syntastic-plugin
gradle-syntastic-plugin copied to clipboard
Android support
Would be awesome if we can use this with android plugin.
Could you point me to an example project?
I need to use the Android application plugin apply plugin: 'com.android.application'
instead of java plugin in gradle build file.
I think the project structure is the same when it's java only. Another problem I found here: syntastic can't found the dependencies, I don't know if it's working for java projects.
I create a workaround here, in my build file, to use temporary:
task("syntasticJars") << {
def parsedItems = (new XmlParser()).parse('build/intermediates/dex-cache/cache.xml')
def jarCollection = new HashSet<String>()
parsedItems.item.each { item ->
jarCollection.add(item.@jar)
}
def paths = jarCollection.collect().join(":")
def output = new File(".syntastic_javac_config")
output.write "let g:syntastic_java_javac_classpath = '" + paths + "'"
}
But my syntastic still missing the project classes. :/
I'm not familiar at all with the com.android.application
plugin. This syntastic
plugin relies on sourceSets to have been created and then extracts the classpath
from those (main
and test
sourceSets
in java and groovy projects).
Do you know where the classpath is store in an android project?
Nevermind, found it under project.android.sourceSets.