Add ktlint Gradle plugin

This commit is contained in:
Gary Tierney
2018-08-22 22:59:25 +01:00
parent d97b6274c6
commit eaa6ff6f2f
2 changed files with 18 additions and 2 deletions
+1
View File
@@ -1,5 +1,6 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version "1.2.60" apply(false)
id 'org.jmailen.kotlinter' version '1.16.0' apply(false)
}
allprojects {
+17 -2
View File
@@ -1,5 +1,20 @@
allprojects {
plugins.withId('kotlin') {
if (it.pluginManager.hasPlugin('kotlin') || it.pluginManager.hasPlugin('apollo-plugin')) {
}
}
gradle.projectsEvaluated {
configure(subprojects.findAll { it.pluginManager.hasPlugin('kotlin') }) {
apply plugin: 'org.jmailen.kotlinter'
kotlinter {
ignoreFailures = true
indentSize = 4
continuationIndentSize = 4
reporters = ['checkstyle', 'plain']
}
kotlin { experimental { coroutines 'enable' } }
}
}
}