forked from sqldelight/sqldelight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (88 loc) · 3.35 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
buildscript {
dependencies {
classpath("com.squareup.okhttp3:okhttp") {
version {
strictly '4.4.1'
}
}
}
}
plugins {
alias(libs.plugins.grammarKitComposer) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.publish) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.spotless)
}
spotless {
kotlin {
target "**/*.kt"
targetExclude "**/gen/**/*.*", "**/generated/**/*.*", "sqldelight-compiler/integration-tests/src/test/kotlin/com/example/**/*.*", "sqldelight-compiler/src/test/migration-interface-fixtures/**/*.*", "sqldelight-gradle-plugin/src/test/build-logic-tests/build/**/*.*"
ktlint(libs.versions.ktlint.get()).editorConfigOverride([
"indent_size": "2",
"ktlint_standard_package-name": "disabled",
"ij_kotlin_allow_trailing_comma": "true",
"ij_kotlin_allow_trailing_comma_on_call_site": "true",
])
trimTrailingWhitespace()
endWithNewline()
}
}
allprojects {
repositories {
mavenCentral()
google()
maven { url 'https://www.jetbrains.com/intellij-repository/releases' }
maven { url "https://cache-redirector.jetbrains.com/intellij-dependencies" }
// Repo for the backported Android IntelliJ Plugin by Jetbrains used in Ultimate
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies/" }
// Repo for Ktor eap builds used by IntelliJ. Some builds use a eap version.
// When a new version of Intellij switched to a stable Ktor version, this repo can be removed.
maven { url "https://maven.pkg.jetbrains.space/public/p/ktor/eap" }
}
tasks.withType(Test).configureEach {
testLogging {
events = ["failed", "skipped", "passed"]
exceptionFormat "full"
}
}
// Workaround for yarn concurrency issue - https://youtrack.jetbrains.com/issue/KT-43320
tasks.withType(org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask).configureEach {
args.addAll(["--mutex", "file:${file("build/.yarn-mutex")}".toString()])
}
// https://youtrack.jetbrains.com/issue/KT-46466
tasks.withType(org.gradle.api.publish.maven.tasks.AbstractPublishToMaven).configureEach {
dependsOn(tasks.withType(Sign))
}
configurations.configureEach {
exclude group: 'com.jetbrains.rd'
exclude group: 'com.github.jetbrains', module: 'jetCheck'
exclude group: 'org.roaringbitmap'
exclude group: "com.jetbrains.infra"
exclude group: "org.jetbrains.teamcity"
exclude group: "org.roaringbitmap"
exclude group: "ai.grazie.spell"
exclude group: "ai.grazie.model"
exclude group: "ai.grazie.utils"
exclude group: "ai.grazie.nlp"
}
group = GROUP
version = VERSION_NAME
}
tasks.named("dokkaHtmlMultiModule") {
outputDirectory = file("$rootDir/docs/2.x")
moduleName.set("SQLDelight")
pluginsMapConfiguration.set(["org.jetbrains.dokka.base.DokkaBase": """
{
"footerMessage": "Copyright © 2022 Square, Inc.",
"customStyleSheets": ["${file("docs/css/logo-styles.css")}"]
}
"""])
// https://github.com/Kotlin/dokka/issues/2954
dependsOn(":sqldelight-compiler:dokkaHtmlMultiModule")
}