Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

KtLint 6.x cannot find sources when used with SAP #146

Closed
tasomaniac opened this issue Nov 8, 2018 · 2 comments
Closed

KtLint 6.x cannot find sources when used with SAP #146

tasomaniac opened this issue Nov 8, 2018 · 2 comments
Labels
Milestone

Comments

@tasomaniac
Copy link
Contributor

KtLint 6.1 and 6.2 have a similar problem everywhere. When custom sourceSets are defined, it would fail to find them. This was recently fixed.

But still, when integrated with our plugin, it never finds the source sets which causes everything to silently pass.

@tasomaniac
Copy link
Contributor Author

More info available here: JLLeitschuh/ktlint-gradle#153 (comment)

The problem I faced was very hard to debug because I keep getting NO-SOURCE. Couldn't find a way to force Gradle to output the reason.

It turns out that there was a behavior change in Ktlint plugin 6.0.0. Instead of resolving Android variant, it just creates a task per sourceSet. In fact, it now has ktlintMain task for the main folder.

@tasomaniac
Copy link
Contributor Author

Opened JLLeitschuh/ktlint-gradle#167 to make ktlint plugin resolve android variants again. Closing this now since we cannot really fix 6.x versions.

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

No branches or pull requests

1 participant