-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
127 lines (116 loc) · 4.24 KB
/
settings.gradle.kts
File metadata and controls
127 lines (116 loc) · 4.24 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
* Copyright 2020-2026 Björn Kautler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import de.fayard.refreshVersions.core.FeatureFlag.GRADLE_UPDATES
import net.kautler.conditionalRefreshVersions
import org.gradle.api.initialization.resolve.RepositoriesMode.FAIL_ON_PROJECT_REPOS
import org.gradle.api.initialization.resolve.RulesMode.FAIL_ON_PROJECT_RULES
pluginManagement {
includeBuild("gradle/build-logic")
includeBuild("gradle/conditional-refresh-versions")
repositories {
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("net.kautler.conditional-refresh-versions")
// part of work-around for https://github.com/autonomousapps/dependency-analysis-gradle-plugin/issues/1672
//id("com.autonomousapps.build-health") version "3.6.1"
//kotlin("multiplatform") version "2.1.20" apply false
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("com.gradle.develocity") version "4.4.0"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.6.0"
}
conditionalRefreshVersions {
featureFlags {
disable(GRADLE_UPDATES)
}
rejectVersionIf {
candidate.stabilityLevel.isLessStableThan(current.stabilityLevel)
}
// work-around for https://github.com/Splitties/refreshVersions/issues/662
layout.rootDirectory.dir("build/tmp/refreshVersions").asFile.mkdirs()
// work-around for https://github.com/Splitties/refreshVersions/issues/640
versionsPropertiesFile = layout.rootDirectory.file("build/tmp/refreshVersions/versions.properties").asFile
}
gradle.rootProject {
tasks.named { it == "refreshVersions" }.configureEach {
val layout = layout
doLast {
// work-around for https://github.com/Splitties/refreshVersions/issues/661
// and https://github.com/Splitties/refreshVersions/issues/663
layout.projectDirectory.file("gradle/libs.versions.toml").asFile.apply {
readText()
.replace("⬆ =", " ⬆ =")
.replace("⬆=", "⬆ =")
.replace("]\n\n", "]\n")
.replace("""(?s)^(.*)(\n\Q[plugins]\E[^\[]*)(\n.*)$""".toRegex(), "$1$3$2")
.also { writeText(it) }
}
}
}
}
dependencyResolutionManagement {
repositories {
ivy("https://nodejs.org/dist/") {
name = "Node.js Distributions"
patternLayout {
artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
}
metadataSources {
artifact()
}
content {
includeModule("org.nodejs", "node")
}
}
ivy("https://github.com/yarnpkg/yarn/releases/download/") {
name = "Yarn Distributions"
patternLayout {
artifact("v[revision]/[artifact](-v[revision]).[ext]")
}
metadataSources {
artifact()
}
content {
includeModule("com.yarnpkg", "yarn")
}
}
mavenCentral()
}
repositoriesMode = FAIL_ON_PROJECT_REPOS
rulesMode = FAIL_ON_PROJECT_RULES
versionCatalogs {
val kotlinWrappers by registering {
from("org.jetbrains.kotlin-wrappers:kotlin-wrappers-catalog:2026.4.5")
}
}
}
develocity {
buildScan {
publishing {
onlyIf {
System.getenv("DEVELOCITY_INJECTION_ENABLED").toBoolean()
}
}
}
}
includeBuild("gradle/build-logic")
include("ncc-packer")
project(":ncc-packer").buildFileName = "ncc-packer.gradle.kts"
rootProject.name = "setup-wsl"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")