mirror of
https://github.com/JakeWharton/mosaic.git
synced 2025-10-29 09:39:13 +08:00
* Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v2.1.0 * Track Dokka changes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jake Wharton <jw@squareup.com>
93 lines
2.5 KiB
Groovy
93 lines
2.5 KiB
Groovy
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.freeCompilerArgs.add('-Xjvm-default=all')
|
|
}
|
|
|
|
tasks.withType(KotlinNativeCompile).configureEach {
|
|
compilerOptions.freeCompilerArgs.add('-Xpartial-linkage=disable')
|
|
}
|
|
|
|
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(),
|
|
])
|
|
}
|
|
}
|
|
}
|