-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathbuild.gradle
More file actions
93 lines (83 loc) · 2.54 KB
/
Copy pathbuild.gradle
File metadata and controls
93 lines (83 loc) · 2.54 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
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
82
83
84
85
86
87
88
89
90
91
92
93
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
buildscript {
dependencies {
classpath libs.kotlin.plugin.core
classpath libs.kotlin.plugin.compose
classpath libs.mavenPublishGradlePlugin
classpath libs.dokkaGradlePlugin
classpath libs.citeGradlePlugin
classpath libs.pokoGradlePlugin
classpath libs.spotlessGradlePlugin
classpath libs.binaryCompatibilityValidatorGradlePlugin
classpath libs.cklibGradlePlugin
classpath libs.jextractGradlePlugin
classpath libs.testDistributionGradlePlugin
classpath libs.burstGradlePlugin
classpath 'com.jakewharton.mosaic.build:gradle-plugin'
}
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
apply plugin: 'org.jetbrains.dokka'
dependencies {
dokka(projects.mosaicAnimation)
dokka(projects.mosaicRuntime)
dokka(projects.mosaicTerminal)
dokka(projects.mosaicTesting)
dokka(projects.mosaicTty)
dokka(projects.mosaicTtyTerminal)
}
allprojects {
group = GROUP
version = VERSION_NAME
repositories {
mavenCentral()
google()
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(KotlinJvmCompile).configureEach {
compilerOptions.jvmTarget = JvmTarget.JVM_11
compilerOptions.jvmDefault = JvmDefaultMode.NO_COMPATIBILITY
}
tasks.withType(KotlinNativeCompile).configureEach {
compilerOptions.freeCompilerArgs.add('-Xpartial-linkage-loglevel=ERROR')
}
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(),
])
}
}
}