-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle.kts
46 lines (39 loc) · 1.34 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
46
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jmailen.gradle.kotlinter.KotlinterPlugin
import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask
plugins {
kotlin("jvm") version "1.8.20" apply false
id("org.jetbrains.dokka") version "1.8.10" apply false
id("com.gradle.plugin-publish") version "1.1.0" apply false
id("com.github.gmazzo.buildconfig") version "3.1.0" apply false
id("org.jmailen.kotlinter") version "3.14.0" apply false
}
allprojects {
group = "com.bnorm.power"
version = "0.14.0-SNAPSHOT"
}
allprojects {
repositories {
mavenCentral()
}
tasks.withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
plugins.withType<KotlinterPlugin> {
val formatBuildscripts = tasks.register<FormatTask>("formatBuildscripts") {
group = "verification"
source(layout.projectDirectory.asFileTree.matching { include("**.kts") })
}
tasks.named("formatKotlin") { dependsOn(formatBuildscripts) }
val lintBuildscripts = tasks.register<LintTask>("lintBuildscripts") {
group = "verification"
source(layout.projectDirectory.asFileTree.matching { include("**.kts") })
}
tasks.named("lintKotlin") { dependsOn(lintBuildscripts) }
}
}