Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ tasks.check {
dependsOn(
tasks.withType<Test>(),
// TODO: https://youtrack.jetbrains.com/issue/KT-78525
tasks.checkLegacyAbi,
tasks.checkKotlinAbi,
)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
jdkRelease = "17"
minGradle = "9.0.0"
kotlin = "2.3.0"
kotlin = "2.3.20-Beta1"
moshi = "1.15.2"
pluginPublish = "2.0.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.github.jengelman.gradle.plugins.shadow.snippet

import com.github.jengelman.gradle.plugins.shadow.testkit.assertNoDeprecationWarnings
import com.github.jengelman.gradle.plugins.shadow.testkit.gradleRunner
import com.github.jengelman.gradle.plugins.shadow.testkit.toWarningsAsErrors
import java.nio.file.Path
import java.util.jar.JarOutputStream
import kotlin.io.path.createDirectory
Expand Down Expand Up @@ -92,11 +91,7 @@ sealed class SnippetExecutable : Executable {
}

try {
gradleRunner(
projectDir = projectRoot,
arguments = listOf("build", "--stacktrace"),
warningsAsErrors = mainScript.toWarningsAsErrors(),
)
gradleRunner(projectDir = projectRoot, arguments = listOf("build", "--stacktrace"))
.build()
.assertNoDeprecationWarnings()
} catch (t: Throwable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.github.jengelman.gradle.plugins.shadow.testkit.assertNoDeprecationWar
import com.github.jengelman.gradle.plugins.shadow.testkit.commonGradleArgs
import com.github.jengelman.gradle.plugins.shadow.testkit.gradleRunner
import com.github.jengelman.gradle.plugins.shadow.testkit.requireResourceAsPath
import com.github.jengelman.gradle.plugins.shadow.testkit.toWarningsAsErrors
import com.github.jengelman.gradle.plugins.shadow.transformers.ResourceTransformer
import com.github.jengelman.gradle.plugins.shadow.util.AppendableMavenRepository
import com.github.jengelman.gradle.plugins.shadow.util.JarBuilder
Expand Down Expand Up @@ -378,16 +377,9 @@ abstract class BasePluginTest {
}

private fun runner(arguments: Iterable<String>, block: GradleRunner.() -> Unit): GradleRunner {
val warningsAsErrors =
try {
projectScript.readText().toWarningsAsErrors()
} catch (_: UninitializedPropertyAccessException) {
true // Default warning mode if projectScript is not initialized yet.
}
return gradleRunner(
projectDir = projectRoot,
arguments = commonGradleArgs + arguments,
warningsAsErrors = warningsAsErrors,
block = block,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@ fun BuildResult.assertNoDeprecationWarnings() = apply {
"will fail with an error in Gradle",
)
}

// TODO: https://youtrack.jetbrains.com/issue/KT-78620
fun String.toWarningsAsErrors(): Boolean = !contains("org.jetbrains.kotlin.multiplatform")