-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (48 loc) · 1.57 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
buildscript {
configurations.all {
resolutionStrategy {
force("com.google.guava:guava:30.1.1-jre")
}
}
dependencies {
classpath("com.google.gms:google-services:4.3.14")
}
}
plugins {
id("org.jetbrains.kotlin.multiplatform") version "1.9.20" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.libary) apply false
alias(libs.plugins.kotlin.androids) apply false
alias(libs.plugins.kover)
id("org.jetbrains.compose") version "1.6.0-alpha01" apply false
id("com.android.test") version "7.2.0" apply false
}
val ktlint by configurations.creating
val outputDir = "${project.buildDir}/reports/ktlint/"
val inputFiles = project.fileTree(mapOf("dir" to "src", "include" to "**/*.kt"))
val ktlintCheck by tasks.creating(JavaExec::class) {
inputs.files(inputFiles)
outputs.dir(outputDir)
description = "Check Kotlin code style."
classpath = ktlint
mainClass.set("com.pinterest.ktlint.Main")
args = listOf("src/**/*.kt")
}
val ktlintFormat by tasks.creating(JavaExec::class) {
inputs.files(inputFiles)
outputs.dir(outputDir)
description = "Fix Kotlin code style deviations."
classpath = ktlint
mainClass.set("com.pinterest.ktlint.Main")
args = listOf("-F", "src/**/*.kt")
}
tasks.register(name = "type", type = Delete::class) {
delete(rootProject.buildDir)
}
dependencies {
ktlint("com.pinterest:ktlint:0.45.2") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
}
}
}