Cant find ktlintApplyToIdea task
See original GitHub issueI’ve added ktLint to my project like so:
Android Studio 3.2.1
At the top of my module level (app) build.gradle
file:
plugins {
id "org.jlleitschuh.gradle.ktlint" version "6.1.0"
}
I wan’t to generate the code styles for my project using ktlintApplyToIdea
but I can’t find the task. Running ./gradlew tasks | grep kt
results only in the following:
ktlintFormat - Runs the ktlint formatter on all kotlin sources in this project. ktlintCheck - Runs ktlint on all kotlin sources in this project.
I believe I was last able to run ktlintApplyToIdea
in version 5x.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
android - Task 'ktlintCheck' not found in project - Stack Overflow
I have a sample project. The build.gradle (project) is: // Top-level build file where you can add configuration options common to all ...
Read more >11.0.0 - GitHub
Configuration should stay the same, so, if you don't configure tasks ... into plugin jar ### Fixed - Fix `ktlintApplyToIdea` task fails when...
Read more >My Android project template - Nicola Corti
In this blog-post, I will walk you through the steps I do before starting an Android project and that you can find already...
Read more >Trying to use ktlint in my Android app Just found out about
Those will generate the gradle tasks you can invoke locally or on CI to lint ... ktlint doesn't have a strong IDE integration,...
Read more >Adding ktlint to Your Kotlin Project - goobar
Your browser can't play this video. ... use the Gradle tool window in IntelliJ or Android Studio to see if the tasks are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @Tapchicoma this solved the problem!
Note for anyone else who encounters the same issue with Android Studio:
plugins
block should be below thebuildscript
block.subprojects
as well to get the other ktlint tasks added to theapp
module.You need to move:
to your project top
build.gradle
. This will automatically apply this plugin to all modules in the project.