-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
51 lines (48 loc) · 1.66 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
51 lines (48 loc) · 1.66 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
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
alias(libs.plugins.androidx.navigation.safeargs) apply false
alias(libs.plugins.cashapp.licensee) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.compose.hotreload) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.spotless)
}
spotless {
val ktLintVersion = libs.versions.kt.lint.get()
val ktLintOptions =
mapOf(
"indent_size" to "2",
"continuation_indent_size" to "2",
"ktlint_function_naming_ignore_when_annotated_with" to "Composable",
)
ratchetFrom = "origin/main"
kotlin {
target("**/*.kt")
targetExclude("**/build/", "**/*_Generated.kt")
ktlint(ktLintVersion).editorConfigOverride(ktLintOptions)
ktfmt().googleStyle()
licenseHeaderFile(
"${project.rootProject.projectDir}/license-header.txt",
"^(package|//startfile)|import|class|object|sealed|open|interface|abstract",
)
}
kotlinGradle {
target("**/*.gradle.kts")
ktlint(ktLintVersion).editorConfigOverride(ktLintOptions)
ktfmt().googleStyle()
}
}
subprojects {
tasks.withType(Test::class.java).configureEach {
maxParallelForks = 1
if (project.providers.environmentVariable("GITHUB_ACTIONS").isPresent) {
// limit memory usage to avoid running out of memory in the docker container.
maxHeapSize = "512m"
}
}
}