-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
75 lines (65 loc) · 1.67 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
buildscript {
dependencies {
classpath("crackers.buildstuff:crackers-gradle-plugins:1.0.1")
}
}
plugins {
kotlin("jvm") version "1.9.0"
`java-library`
idea
id("org.jmailen.kotlinter") version "3.12.0"
id("library-publish") version "1.0.1"
id("org.jetbrains.dokka") version "1.8.10"
id("net.thauvin.erik.gradle.semver") version "1.0.4"
}
group = "crackers.automation"
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
api("org.json:json:20231013")
api("org.slf4j:slf4j-api:2.0.0")
testImplementation("io.kotest:kotest-runner-junit5:5.5.4")
testImplementation("io.mockk:mockk:1.13.3")
testImplementation("org.slf4j:slf4j-simple:2.0.0")
}
kotlin {
jvmToolchain(17)
}
kotlinter {
// ignore failures because the build re-formats it
ignoreFailures = true
disabledRules = arrayOf("no-wildcard-imports")
}
tasks {
build {
dependsOn("formatKotlin")
}
check {
// dependsOn("installKotlinterPrePushHook")
dependsOn("formatKotlin")
}
test {
useJUnitPlatform()
}
// make docs
dokkaJavadoc {
mustRunAfter("javadoc")
outputDirectory.set(file("$projectDir/build/docs"))
}
javadocJar {
mustRunAfter("dokkaJavadoc")
include("$projectDir/build/docs")
}
// jar docs
register<Jar>("dokkaJavadocJar") {
dependsOn(dokkaJavadoc)
from(dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}
generateMetadataFileForLibraryPublication {
mustRunAfter("dokkaJavadocJar")
}
}
defaultTasks("clean", "build", "dokkaJavadocJar", "libraryDistribution")