-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
67 lines (58 loc) · 1.72 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.1.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.0"
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"
id("io.gitlab.arturbosch.detekt") version "1.23.5"
}
group = "com.ganggreentempertatum"
version = "1.0.3"
repositories {
mavenCentral()
}
dependencies {
compileOnly("net.portswigger.burp.extensions:montoya-api:2024.12")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
}
tasks.test {
useJUnitPlatform()
}
tasks.register("installGitHooks") {
doLast {
val hooksDir = File("${rootProject.rootDir}/.git/hooks")
val hookFile = File(hooksDir, "pre-commit")
hookFile.writeText("""
#!/bin/sh
./gradlew ktlintCheck
./gradlew detekt
""".trimIndent())
hookFile.setExecutable(true)
}
}
ktlint {
version.set("1.1.1")
verbose.set(true)
outputToConsole.set(true)
enableExperimentalRules.set(true)
filter {
exclude { element -> element.file.path.contains("generated/") }
}
reporters {
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.HTML)
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE)
}
}
detekt {
buildUponDefaultConfig = true
allRules = false
config = files("$projectDir/config/detekt.yml")
baseline = file("$projectDir/config/baseline.xml")
reports {
html.required.set(true)
xml.required.set(true)
txt.required.set(true)
sarif.required.set(true)
}
}