Closed yusufceylan closed 5 years ago
You should not mix old and new way of applying plugins. Check the second entry in FAQ section.
Sorry @Tapchicoma but I do not understand clearly. I changed my project gradle file with this but still same.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.0.0"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: "org.jlleitschuh.gradle.ktlint"
Also found a video tutorial and followed it but still always successful
In the change above you've missed applying this plugin to all subprojects:
allprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint"
}
It works now, thanks a lot @Tapchicoma
I am trying to integrate ktlint to my project.
My project level gradle file
I also break some rules for checking and here is my Activity
When I call
gradlew ktlintCheck
command, build is always successful even if I already break some rules.Gradle Version 5.4.1 Android Gradle Plugin Version 3.5.1 Android Studio Version 3.5.1
Any idea why this is happening?