-
Notifications
You must be signed in to change notification settings - Fork 162
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
src/main/kotlin not working out of the box #524
Comments
Sorry, I don't get what is the issue? Plugin does not do such renaming and should not do. |
Experiencing a similar issue when using AGP 7.0 and 10.1.0 version of this plugin. It looks like AGP introduced another source set called If understand it correctly, this plugin only looks at the ktlint-gradle/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/android/AndroidPluginsApplier.kt Line 72 in d945407
Workaround for now is to add Kotlin directories to android.sourceSets.configureEach {
java.srcDirs("src/$name/kotlin")
} |
Thanks for explaining what my issue is. |
Maybe we should support the |
The kotlinter plugin fixed this issue in this PR jeremymailen/kotlinter-gradle#229 Should this ktlint plugin fix the issue too? |
PRs are welcome to resolve this issue, please do include test coverage. |
What do we intend to do about this issue? I see that the PR #558 has no movement for 2+ months now. |
If this is something that is not going to be addressed soon or isn't being actively worked on at this moment, I'd really like to see it in the readme. I've unfortunately wasted way too much time thinking my setup was wrong and the fix was to simply rename the dir from kotlin to java. I am sure that there's more people out there who have also come across this bug unfortunately. Would you accept a contribution to the README if I were to write a sentence about this bug until it's resolved? |
More context: src/main/kotlin not working out of the box #524 JLLeitschuh/ktlint-gradle#524
More context: src/main/kotlin not working out of the box JLLeitschuh/ktlint-gradle#524
PRs are welcome to address this problem. Please see the pinned comment regarding the current maintenance status of this project |
Right, I was referring to merging a PR with some explanatory text, perhaps as an entry to the FAQ which would mention that you need to name the file |
This should be fixed by #733. |
As of Android Studio Arctic Fox and Android Gradle Plugin 7.0, we do not need to specify the source directories for java:
https://stackoverflow.com/questions/41467453/renaming-java-directory-to-kotlin-in-android-studio
You should also support this out of the box for ktlint.
The text was updated successfully, but these errors were encountered: