Skip to content

Commit 66dc0a5

Browse files
authored
Don't write build scan link for the test partions task (#12335)
1 parent 1f8026e commit 66dc0a5

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (project.findProperty("skipTests") as String? == "true") {
4949
}
5050
}
5151

52-
if (gradle.startParameter.taskNames.any { it.equals("listTestsInPartition") }) {
52+
if (gradle.startParameter.taskNames.contains("listTestsInPartition")) {
5353
tasks {
5454
val listTestsInPartition by registering {
5555
group = "Help"

settings.gradle.kts

+10-6
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ if (useScansGradleCom) {
6565
fileFingerprints = true
6666
}
6767

68-
buildScanPublished {
69-
File("build-scan.txt").printWriter().use { writer ->
70-
writer.println(buildScanUri)
68+
if (!gradle.startParameter.taskNames.contains("listTestsInPartition")) {
69+
buildScanPublished {
70+
File("build-scan.txt").printWriter().use { writer ->
71+
writer.println(buildScanUri)
72+
}
7173
}
7274
}
7375
}
@@ -89,9 +91,11 @@ if (useScansGradleCom) {
8991
value("Smoke test suite", it)
9092
}
9193

92-
buildScanPublished {
93-
File("build-scan.txt").printWriter().use { writer ->
94-
writer.println(buildScanUri)
94+
if (!gradle.startParameter.taskNames.contains("listTestsInPartition")) {
95+
buildScanPublished {
96+
File("build-scan.txt").printWriter().use { writer ->
97+
writer.println(buildScanUri)
98+
}
9599
}
96100
}
97101
}

0 commit comments

Comments
 (0)