Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android support #8

Open
vitorprado opened this issue Nov 10, 2015 · 3 comments
Open

Android support #8

vitorprado opened this issue Nov 10, 2015 · 3 comments

Comments

@vitorprado
Copy link

Would be awesome if we can use this with android plugin.

@Scuilion
Copy link
Owner

Could you point me to an example project?

@vitorprado
Copy link
Author

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. :/

@Scuilion
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants