Basic configuration of Kotlin based Gradle projects.
plugins {
id("de.lancom.genesis.kotlin") version "<version>"
}genesisKotlin {
// enable code documentation
withDokka()
// register additional artifacts
withJavadocJar()
withSourcesJar()
// enable code quality checks
withDetekt(
detektVersion = "0.15.0" // optional
)
withKtlint(
ktlintVersion = "0.40.0" // optional
)
// enable additional kotlin compiler plugins
withSpringSupport() // org.jetbrains.kotlin.plugin.spring
withJpaSupport() // org.jetbrains.kotlin.plugin.jpa
}Detekt can be configured by creating a Detekt config file config/detekt/detekt.yml like
the example file or by running the detektGenerateConfig task.
For additional information see the Detekt documentation.
KtLinkt can be configured using the .editorconfig file like the example file.
For additional information see the KtLint Plugin.
An example project can be found in the examples/project.
Execute ./gradlew -p example <tasks> to run tasks of the example project.