forked from askimo-ai/askimo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
80 lines (73 loc) · 2.37 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
80 lines (73 loc) · 2.37 KB
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
76
77
78
79
80
plugins {
id("com.diffplug.spotless") version "7.2.1"
kotlin("jvm") version "2.2.10" apply false
id("org.jetbrains.kotlin.plugin.serialization") version "2.2.10" apply false
id("org.graalvm.buildtools.native") version libs.versions.graalvm.plugin apply false
}
allprojects {
group = "io.askimo"
version = "0.1.2"
repositories {
mavenCentral()
}
// Apply Kotlin plugins to all projects
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.plugin.serialization")
// Apply Spotless to all projects
apply(plugin = "com.diffplug.spotless")
extensions.extraProperties["spotlessSetLicenseHeaderYearsFromGitHistory"] = true
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
ratchetFrom("origin/main")
kotlin {
ktlint()
licenseHeaderFile(
rootProject.file("HEADER-SRC"),
"(package|import|@file:)",
)
trimTrailingWhitespace()
leadingTabsToSpaces(4)
endWithNewline()
}
kotlinGradle {
ktlint()
trimTrailingWhitespace()
leadingTabsToSpaces(4)
endWithNewline()
}
format("json") {
target("**/*.json")
targetExclude("**/build/**")
prettier().config(mapOf("parser" to "json"))
trimTrailingWhitespace()
endWithNewline()
}
format("html") {
target("**/*.html")
targetExclude("**/build/**")
prettier().config(mapOf("parser" to "html"))
trimTrailingWhitespace()
endWithNewline()
}
format("javascript") {
target("**/*.js")
targetExclude("**/build/**")
prettier().config(mapOf("parser" to "babel"))
trimTrailingWhitespace()
endWithNewline()
}
format("css") {
target("**/*.css")
targetExclude("**/build/**")
prettier().config(mapOf("parser" to "css"))
trimTrailingWhitespace()
endWithNewline()
}
}
plugins.withId("org.jetbrains.kotlin.jvm") {
extensions.configure<org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension> {
compilerOptions {
javaParameters.set(true)
}
}
}
}