-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
settings.gradle.kts
166 lines (150 loc) · 5.48 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
import net.twisterrob.gradle.build.dsl.isCI
import net.twisterrob.gradle.build.settings.enableFeaturePreviewQuietly
import net.twisterrob.gradle.doNotNagAbout
// TODEL https://github.com/gradle/gradle/issues/18971
rootProject.name = "net-twisterrob-gradle"
pluginManagement {
includeBuild("gradle/plugins")
includeBuild("graph")
repositories {
// This is the default, but it helps Renovate to resolve some plugins.
gradlePluginPortal()
}
}
plugins {
// Allows using classes / functions from gradle/plugins project.
id("net.twisterrob.gradle.build.settings")
id("net.twisterrob.gradle.build.develocity")
}
// buildscript { enableDependencyLocking(settings) }
enableFeaturePreviewQuietly("TYPESAFE_PROJECT_ACCESSORS", "Type-safe project accessors")
include(":quality")
include(":common")
include(":test")
include(":test:integration")
include(":test:internal")
include(":test:internal:runtime")
listOf("checkstyle", "pmd").forEach {
include(":${it}")
project(":${it}").projectDir = file("checkers/${it}")
}
include(":compat:agp")
include(":compat:agp-base")
include(":compat:agp-70x")
include(":compat:agp-71x")
include(":compat:agp-72x")
include(":compat:agp-73x")
include(":compat:agp-74x")
include(":compat:agp-80x")
include(":compat:agp-81x")
include(":compat:agp-82x")
include(":compat:agp-83x")
include(":compat:agp-84x")
include(":compat:agp-85x")
include(":compat:gradle")
include(":compat:kotlin-base")
include(":browser:pmd")
include(":browser:checkstyle")
include(":browser:lint")
include(":browser:agp-40x")
include(":browser:agp-41x")
include(":browser:agp-42x")
include(":browser:agp-70x")
include(":browser:agp-71x")
include(":browser:agp-72x")
include(":browser:agp-73x")
include(":browser:agp-74x")
include(":browser:agp-80x")
include(":browser:agp-81x")
include(":browser:agp-82x")
include(":browser:agp-83x")
include(":browser:agp-84x")
include(":browser:agp-85x")
//include(":browser:agp-86x")
include(":browser:kotlin-14x")
include(":browser:kotlin-16x")
include(":browser:kotlin-19x")
include(":plugin")
include(":plugin:base")
include(":plugin:versioning")
include(":plugin:languages")
include(":plugin:signing")
include(":plugin:release")
include(":plugin:building")
include(":plugin:reporting")
include(":plugin:settings")
if (settings.extra["net.twisterrob.gradle.build.includeExamples"].toString().toBoolean()) {
includeBuild("docs/examples/local")
includeBuild("docs/examples/snapshot")
includeBuild("docs/examples/release")
}
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
repositories {
google()
mavenCentral()
// for Kotlin-DSL
maven { setUrl("https://repo.gradle.org/gradle/libs-releases-local/") }
}
versionCatalogs {
create(defaultLibrariesExtensionName.get()) {
// Implicit behavior: from(files("gradle/libs.versions.toml"))
// Load additional libraries from other files:
load(file("gradle/agp.versions.toml"))
load(file("gradle/kotlin.versions.toml"))
}
}
}
val gradleVersion: String = GradleVersion.current().version
// TODEL Gradle 8.2 sync in IDEA 2023.1 https://youtrack.jetbrains.com/issue/IDEA-320266.
@Suppress("detekt.MaxLineLength", "detekt.StringLiteralDuplication")
if ((System.getProperty("idea.version") ?: "") < "2023.3") {
// There are ton of warnings, ignoring them all by their class names in one suppression.
doNotNagAbout(
Regex(
"^" +
"(" +
Regex.escape("The Project.getConvention() method has been deprecated. ") +
"|" +
Regex.escape("The org.gradle.api.plugins.Convention type has been deprecated. ") +
"|" +
Regex.escape("The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. ") +
")" +
Regex.escape("This is scheduled to be removed in Gradle 9.0. ") +
Regex.escape("Consult the upgrading guide for further information: ") +
Regex.escape("https://docs.gradle.org/${gradleVersion}/userguide/upgrading_version_8.html#") +
".*" +
"(" +
Regex.escape("at org.jetbrains.kotlin.idea.gradleTooling.KotlinTasksPropertyUtilsKt.") +
"|" +
Regex.escape("at org.jetbrains.plugins.gradle.tooling.util.JavaPluginUtil.") +
"|" +
Regex.escape("at org.jetbrains.plugins.gradle.tooling.builder.ExternalProjectBuilderImpl.") +
"|" +
Regex.escape("at org.jetbrains.plugins.gradle.tooling.builder.ProjectExtensionsDataBuilderImpl.") +
")" +
".*$"
)
)
} else {
val error: (String) -> Unit = if (isCI) ::error else logger::warn
error("IDEA version changed, please review hack.")
}
// TODEL Gradle 8.2 sync in IDEA 2023.1 https://youtrack.jetbrains.com/issue/IDEA-320307.
@Suppress("detekt.MaxLineLength", "detekt.StringLiteralDuplication")
if ((System.getProperty("idea.version") ?: "") < "2023.3") {
@Suppress("detekt.MaxLineLength", "detekt.StringLiteralDuplication")
doNotNagAbout(
"The BuildIdentifier.getName() method has been deprecated. " +
"This is scheduled to be removed in Gradle 9.0. " +
"Use getBuildPath() to get a unique identifier for the build. " +
"Consult the upgrading guide for further information: " +
"https://docs.gradle.org/${gradleVersion}/userguide/upgrading_version_8.html#build_identifier_name_and_current_deprecation",
// There are 4 stack traces coming to this line, ignore them all at once.
"at org.jetbrains.plugins.gradle.tooling.util.resolve.DependencyResolverImpl.resolveDependencies(DependencyResolverImpl.java:266)"
)
} else {
val error: (String) -> Unit = if (isCI) ::error else logger::warn
error("IDEA version changed, please review hack.")
}