-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle.kts
45 lines (40 loc) · 1.35 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
base
kotlin("jvm") version Libs.Versions.kotlin apply false
id("com.gradle.plugin-publish") version Libs.Versions.gradlePluginPublish apply false
id("com.vanniktech.maven.publish") version Libs.Versions.vanniktechMavenPublish apply false
id("io.gitlab.arturbosch.detekt") version(Libs.Versions.detektGradlePlugin) apply false
id("org.jetbrains.dokka") version Libs.Versions.dokkaGradlePlugin
id("org.jlleitschuh.gradle.ktlint") version Libs.Versions.ktlintGradlePlugin
}
allprojects {
group = project.group
version = project.version
repositories {
mavenCentral()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
tasks.withType<Detekt> {
// Target version of the generated JVM bytecode. It is used for type resolution.
this.jvmTarget = "11"
}
}
subprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
ktlint {
version.set(Libs.Versions.ktlint)
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
}
tasks.register<Exec>("installGitHooks") {
workingDir = project.rootDir
commandLine("./build-support/bin/install-git-hooks")
}