-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
51 lines (49 loc) · 1.5 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
plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.composeMultiplatform) apply false
alias(libs.plugins.composeCompiler) apply false
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.kotlinSerialization) apply false
alias(libs.plugins.googleKsp) apply false
alias(libs.plugins.buildKonfig) apply false
alias(libs.plugins.spotless)
}
subprojects {
apply(plugin = "com.diffplug.spotless")
spotless {
kotlin {
ktlint("1.4.1")
.setEditorConfigPath(rootProject.file(".editorconfig"))
target("**/*.kt")
targetExclude("**/build/")
endWithNewline()
trimTrailingWhitespace()
}
format("kts") {
target("**/*.kts")
targetExclude("${layout.buildDirectory.get()}/**/*.kts")
}
format("misc") {
target("**/*.md", "**/.gitignore")
trimTrailingWhitespace()
indentWithTabs()
endWithNewline()
}
}
}
tasks.register<Copy>("setUpGitHooks") {
group = "help"
from("$rootDir/scripts")
into("$rootDir/.git/hooks")
filePermissions {
user {
read = true
execute = true
}
other.execute = false
}
}