-
Notifications
You must be signed in to change notification settings - Fork 49
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
FormatKotlin task doesn't seem to format code in /kotlin sourceset. #115
Comments
Thanks for the report. Which kotlin plugin are you using -- jvm or android? Any customizations in the gradle build DSL I should note to reproduce it? |
Plugins: android { defaultConfig {
} buildTypes { compileOptions { kotlinOptions { sourceSets { testOptions { buildToolsVersion = '29.0.2' |
I think I see what's happening. kotlinter-gradle is resolving the I think it's fixable if we use a gradle |
The tasks don't even appear for Kotlin Multiplatform projects - is it possible that that's the same issue? |
I don't believe so @jonasbark, kotlinter doesn't yet support automatically creating tasks for the multiplatform plugin, although you could create them manually. |
I know the issue is quite outdated, but I faced exactly the same issue as the original one. From my understanding calling:
could be easily replaced with:
(it also works for build variant specific sources like i.e. |
Thanks for the tip @mateuszkwiecinski! This issue is still very much alive and on my mind. I just need to find some time to refactor so that sources are lazily evaluated. PRs are also very welcome. |
* Unify project setup * Add tests covering modified sourcesets * Lazily evaluate taks sources, use lazy task configuration api * Add few checks for extension evaluation * Change function name to match existing naming convention * Remove unused dependency. Fix test assertion. * Restore kotlin plugin version. Update comments * Fix invalid AGP extension usages * Add test covering new sourceset Rename variable
Fixed in 2.3.0 |
FormatKotlin task doesn't seem to work for code inside /src/main/kotlin/* sourcesets. But it works just fine for /src/main/java/*.
The text was updated successfully, but these errors were encountered: