-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathbuild.gradle
81 lines (72 loc) · 2.22 KB
/
build.gradle
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
81
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
buildscript {
dependencies {
classpath libs.kotlin.plugin.core
classpath libs.kotlin.plugin.compose
classpath libs.maven.publish.gradlePlugin
classpath libs.dokka.gradlePlugin
classpath libs.cite.gradlePlugin
classpath libs.poko.gradlePlugin
classpath libs.spotless.gradlePlugin
classpath libs.binary.compatibility.validator.gradlePlugin
classpath libs.cklib.gradlePlugin
classpath 'com.jakewharton.mosaic.build:gradle-plugin'
}
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
apply plugin: 'org.jetbrains.dokka'
allprojects {
group = GROUP
version = VERSION_NAME
repositories {
mavenCentral()
google()
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(KotlinJvmCompile).configureEach {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
}
tasks.withType(KotlinCompile).configureEach {
compilerOptions.freeCompilerArgs.add('-Xjvm-default=all')
}
tasks.withType(AbstractTestTask).configureEach {
testLogging {
if (System.getenv('CI') == 'true') {
events = ['started', 'failed', 'skipped', 'passed']
showStandardStreams = true
}
exceptionFormat 'full'
}
}
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target('src/**/*.kt')
ktlint(libs.ktlint.core.get().version)
.editorConfigOverride([
'ktlint_standard_filename': 'disabled',
// Making something an expression body should be a choice around readability.
'ktlint_standard_function-expression-body': 'disabled',
'ktlint_standard_property-naming': 'disabled',
'ktlint_function_naming_ignore_when_annotated_with': 'Composable',
'ktlint_compose_modifier-missing-check': 'disabled',
'ktlint_compose_compositionlocal-allowlist': 'disabled',
'compose_treat_as_lambda': 'MeasurePolicy'
])
.customRuleSets([
libs.ktlint.composeRules.get().toString(),
])
}
}
}