mirror of
https://github.com/Anvilcraft/modpacktools
synced 2024-06-10 22:49:26 +02:00
add ktlint to prevent tilera from writing ugly code
This commit is contained in:
parent
b448088967
commit
820c792a7b
|
@ -20,6 +20,7 @@ plugins {
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
id("org.jetbrains.kotlin.jvm") version "1.3.72"
|
id("org.jetbrains.kotlin.jvm") version "1.3.72"
|
||||||
id("org.jetbrains.dokka") version "1.4.0-rc"
|
id("org.jetbrains.dokka") version "1.4.0-rc"
|
||||||
|
id("org.jlleitschuh.gradle.ktlint") version "9.3.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<JavaPluginConvention> {
|
configure<JavaPluginConvention> {
|
||||||
|
@ -90,8 +91,10 @@ task("fatJar", Jar::class) {
|
||||||
set("Implementation-Title", implTitle)
|
set("Implementation-Title", implTitle)
|
||||||
}
|
}
|
||||||
archiveBaseName.set(jarName)
|
archiveBaseName.set(jarName)
|
||||||
from(configurations.runtimeClasspath.get()
|
from(
|
||||||
.map {if(it.isDirectory) it else zipTree(it)})
|
configurations.runtimeClasspath.get()
|
||||||
|
.map {if(it.isDirectory) it else zipTree(it)}
|
||||||
|
)
|
||||||
with(tasks.jar.get())
|
with(tasks.jar.get())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,3 +116,13 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ktlint {
|
||||||
|
disabledRules.set(
|
||||||
|
setOf(
|
||||||
|
"comment-spacing",
|
||||||
|
"curly-spacing",
|
||||||
|
"keyword-spacing"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue