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 Gradle not working #11

Closed
dsvoronin opened this issue Aug 31, 2016 · 3 comments
Closed

Android Gradle not working #11

dsvoronin opened this issue Aug 31, 2016 · 3 comments

Comments

@dsvoronin
Copy link

Does anybody successfully ran ktlint with android?

i always have

Skipping task ':app:ktlint' as task onlyIf is false.
:app:ktlint SKIPPED

configuration same as in readme

@dsvoronin dsvoronin changed the title Android Gradle Android Gradle not working Aug 31, 2016
@shyiko
Copy link
Collaborator

shyiko commented Aug 31, 2016

Take a look here. I doubt that problem is Android-related, though (do you have ktlint.onlyIf { ... } somewhere in your build.gardle by any chance). ktlint task doesn't really care about anything but source code location.

Let me know If it doesn't help (in which case please provide a test project or at least a build.gradle). Thank you.

@shyiko shyiko closed this as completed Sep 3, 2016
@dsvoronin
Copy link
Author

dsvoronin commented Sep 5, 2016

Thanks. My problem was inaccessible classpath.
Somehow SKIPPED is only debug information(with --debug flag ofc) i had with actual Error: Could not find or load main class.

I'm not a master of android plugin configurations manipulation, but something unobvious happens there.

Accessing 'tools only classpath' with buildconfig hack is an easy path, but be aware of different classpaths for different build.gradles. I had dependency in root buildscript, and it was inaccessible from child scripts.

@shyiko
Copy link
Collaborator

shyiko commented Sep 5, 2016

@dsvoronin I guess, sooner or later, I'm gonna have to create a designated plugin to alleviate these kind of problem. Anyway, thanks for the heads-up!

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

No branches or pull requests

2 participants