-
Notifications
You must be signed in to change notification settings - Fork 42
/
settings.gradle.kts
103 lines (90 loc) · 2.88 KB
/
settings.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
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
100
101
102
103
@file:Suppress("UnstableApiUsage")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "jewel"
pluginManagement {
repositories {
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
gradlePluginPortal()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
google()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://www.jetbrains.com/intellij-repository/releases")
maven("https://www.jetbrains.com/intellij-repository/snapshots")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
mavenCentral()
}
}
plugins {
id("com.gradle.enterprise") version "3.15.1"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("org.danilopianini.gradle-pre-commit-git-hooks") version "2.0.9"
}
include(
":decorated-window",
":foundation",
":ide-laf-bridge",
":ide-laf-bridge-tests",
":int-ui:int-ui-decorated-window",
":int-ui:int-ui-standalone",
":markdown:core",
":markdown:extension:autolink",
":markdown:extension:gfm-alerts",
":markdown:int-ui-standalone-styling",
":markdown:ide-laf-bridge-styling",
":samples:ide-plugin",
":samples:standalone",
":ui",
":ui-test",
)
gradleEnterprise {
buildScan {
publishAlwaysIf(System.getenv("CI") == "true")
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
val isWindows
get() = System.getProperty("os.name").contains("win", true)
val gradleCommand: String by
lazy(LazyThreadSafetyMode.NONE) {
val gradlewFilename =
if (isWindows) {
"gradlew.bat"
} else {
"gradlew"
}
val gradlew = File(rootProject.projectDir, gradlewFilename)
if (gradlew.exists() && gradlew.isFile && gradlew.canExecute()) {
logger.info("Using gradlew wrapper at ${gradlew.invariantSeparatorsPath}")
gradlew.invariantSeparatorsPath
} else {
"gradle"
}
}
val shebang = if (isWindows) "" else "#!/bin/sh"
gitHooks {
hook("pre-push") {
from(shebang) {
// language=Shell Script
"""
|#### Note: this hook was autogenerated. You can edit it in settings.gradle.kts
|GRADLEW=$gradleCommand
|if ! ${'$'}GRADLEW ktfmtCheck ; then
| ${'$'}GRADLEW ktfmtFormat
| echo 1>&2 "\nktfmt found problems; commit the result and re-push"
| exit 1
|fi
|
"""
.trimMargin()
}
}
createHooks(overwriteExisting = true)
}
include("ui-tests")