This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle.kts
45 lines (36 loc) · 1.52 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
// Copyright 2023, Christopher Banes and the project contributors
// SPDX-License-Identifier: Apache-2.0
plugins {
id("com.android.library") version "8.4.1" apply false
id("com.android.application") version "8.4.1" apply false
kotlin("multiplatform") version "1.9.24" apply false
id("org.jetbrains.kotlin.android") version "1.9.24" apply false
id("org.jetbrains.compose") version "1.6.10" apply false
id("com.diffplug.spotless") version "6.25.0"
id("com.vanniktech.maven.publish") version "0.28.0"
}
allprojects {
apply(plugin = "com.diffplug.spotless")
spotless {
kotlin {
target("src/**/*.kt")
ktlint()
licenseHeaderFile(rootProject.file("spotless/cb-copyright.txt"))
.named("cb-existing")
.onlyIfContentMatches("Copyright \\d+,* Christopher Banes")
licenseHeaderFile(rootProject.file("spotless/cb-copyright.txt"))
.named("cb-none")
.onlyIfContentMatches("^(?!// Copyright).*\$")
}
kotlinGradle {
target("*.kts")
ktlint()
licenseHeaderFile(rootProject.file("spotless/cb-copyright.txt"), "(^(?![\\/ ]\\**).*$)")
.named("cb-existing")
.onlyIfContentMatches("Copyright \\d+,* Christopher Banes")
licenseHeaderFile(rootProject.file("spotless/cb-copyright.txt"), "(^(?![\\/ ]\\**).*$)")
.named("cb-none")
.onlyIfContentMatches("^(?!// Copyright).*\$")
}
}
}