Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ val maxParallelTestForks =

// Must be in sync with TestVersions.kt KTI-1612
val gradleVersions = listOf(
"7.4.2", // check org.jetbrains.kotlin.gradle.GradleCompatibilityIT.testIncompatibleGradleVersion
"8.13", // check org.jetbrains.kotlin.gradle.GradleCompatibilityIT.testIncompatibleGradleVersion
"8.14.5",
"9.0.0",
"9.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class ProblemsApiIT : KGPBaseTest() {

val actualProblems = problemReport.diagnostics.filter {
it.problemId.all { id ->
id.name != "OldNativeVersionDiagnostic" && id.name != "deprecated-gradle-version-warning"
id.name != "OldNativeVersionDiagnostic"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface TestVersions {
// https://gradle.org/nightly/
// Gradle nightly releases retention policy is 3 months
object Gradle {
const val G_7_4 = "7.4.2"
const val G_8_13 = "8.13"
const val G_8_14 = "8.14.5"
const val G_9_0 = "9.0.0"
const val G_9_1 = "9.1.0"
Expand All @@ -29,11 +29,10 @@ interface TestVersions {
/**
* Check [org.jetbrains.kotlin.gradle.GradleCompatibilityIT.testIncompatibleGradleVersion]
*/
// TODO - KT-84114 change to Gradle 8.13
const val MIN_UNSUPPORTED_VERSION_TO_CHECK = G_7_4
const val MIN_UNSUPPORTED_VERSION_TO_CHECK = G_8_13

// Should be the same as GradleCompatibilityCheck.minSupportedGradleVersion
const val MIN_SUPPORTED = G_8_14 // TODO - KT-84114: return back to MINIMALLY_SUPPORTED_GRADLE_VERSION
const val MIN_SUPPORTED = MINIMALLY_SUPPORTED_GRADLE_VERSION
const val MAX_SUPPORTED = G_9_7
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ fun BuildResult.extractProjectsAndTheirDiagnosticsInBlocks(): List<String> {
// Environment-dependent and expected to differ between local and CI setups.
}

KotlinToolingDiagnostics.DeprecatedGradleVersionWarning.id in firstDiagnosticLine -> {
// Generic diagnostic that has a dedicated test.
}

KotlinToolingDiagnostics.InternalKotlinGradlePluginPropertiesUsed.id in firstDiagnosticLine -> {
val cleanedDiagnostic = filterKgpUtilityPropertiesFromDiagnostic(currentDiagnostic)
if (cleanedDiagnostic.isNotEmpty()) blocks += cleanedDiagnostic.joinToString(separator = "\n", postfix = "\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ import org.jetbrains.kotlin.gradle.plugin.diagnostics.reportDiagnosticOncePerBui


internal object GradleCompatibilityCheck {
internal const val minSupportedGradleVersionString = "7.6.3"
internal const val nextMinimumSupportedGradleVersionString = "8.14.4"
internal const val minSupportedGradleVersionString = "8.14"

private val minSupportedGradleVersion = GradleVersion.version(minSupportedGradleVersionString)
private val nextMinimumSupportedGradleVersion = GradleVersion.version(nextMinimumSupportedGradleVersionString)

fun Project.runGradleCompatibilityCheck(
gradleVersionProvider: CurrentGradleVersionProvider = DefaultCurrentGradleVersionProvider
Expand All @@ -37,13 +35,6 @@ internal object GradleCompatibilityCheck {
logger.error("Failed to report Gradle version incompatibility diagnostic properly. Throwing it straight away.", e)
throw KotlinDiagnosticsException(diagnostic.toString())
}
} else if (currentVersion < nextMinimumSupportedGradleVersion) {
reportDiagnosticOncePerBuild(
KotlinToolingDiagnostics.DeprecatedGradleVersionWarning(
currentVersion,
nextMinimumSupportedGradleVersion,
)
)
}
}

Expand All @@ -54,4 +45,4 @@ internal object GradleCompatibilityCheck {
internal object DefaultCurrentGradleVersionProvider : CurrentGradleVersionProvider {
override fun get(): GradleVersion = GradleVersion.current()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -733,28 +733,6 @@ internal object KotlinToolingDiagnostics {
}
}

object DeprecatedGradleVersionWarning : ToolingDiagnosticFactory(WARNING, DiagnosticGroup.Kgp.Deprecation) {
operator fun invoke(
currentGradleVersion: GradleVersion,
nextMinimumSupportedGradleVersion: GradleVersion,
) = build {
title("Deprecated Gradle Version")
.description {
"""
The used Gradle version ($currentGradleVersion) is deprecated and will not be supported in future Kotlin Gradle Plugin releases.
The minimum supported Gradle version will become $nextMinimumSupportedGradleVersion in Kotlin 2.5.0.

This warning can be suppressed in 'gradle.properties':
${KOTLIN_SUPPRESS_GRADLE_PLUGIN_WARNINGS_PROPERTY}=$id

""".trimIndent()
}
.solution {
"Please update the Gradle version to at least $nextMinimumSupportedGradleVersion."
}
}
}

object IncompatibleAgpVersionTooLowFatalError : ToolingDiagnosticFactory(FATAL, DiagnosticGroup.Kgp.Misconfiguration) {
operator fun invoke(
androidGradlePluginVersionString: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ class GradleCompatibilityCheckTest {
gradle.registerMinimalVariantImplementationFactoriesForTests()
}

private val unsupportedGradleVersion = FixedAndroidGradlePluginVersionProvider("7.5.1")
private val deprecatedGradleVersion = FixedAndroidGradlePluginVersionProvider("8.13")
private val unsupportedGradleVersion = FixedAndroidGradlePluginVersionProvider("8.13")
private val supportedGradleVersion = FixedAndroidGradlePluginVersionProvider(
GradleCompatibilityCheck.nextMinimumSupportedGradleVersionString
GradleCompatibilityCheck.minSupportedGradleVersionString
)

@Test
Expand All @@ -38,12 +37,6 @@ class GradleCompatibilityCheckTest {
genericProject.checkDiagnostics("checkers/gradleCompatibilityCheck/versionTooLow")
}

@Test
fun testVersionIsDeprecated() {
genericProject.runGradleCompatibilityCheck(deprecatedGradleVersion)
genericProject.checkDiagnostics("checkers/gradleCompatibilityCheck/versionDeprecated")
}

@Test
fun testVersionAboveDeprecatedRange() {
genericProject.runGradleCompatibilityCheck(supportedGradleVersion)
Expand All @@ -61,4 +54,4 @@ class GradleCompatibilityCheckTest {
) : GradleCompatibilityCheck.CurrentGradleVersionProvider {
override fun get(): GradleVersion = GradleVersion.version(version)
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[IncompatibleGradleVersionTooLowFatalError | FATAL] Gradle Version Incompatible with Kotlin Gradle Plugin
Kotlin Gradle Plugin <-> Gradle compatibility issue:
The applied Kotlin Gradle is not compatible with the used Gradle version (Gradle 7.5.1).
Please update the Gradle version to at least Gradle 7.6.3.
The applied Kotlin Gradle is not compatible with the used Gradle version (Gradle 8.13).
Please update the Gradle version to at least Gradle 8.14.
16 changes: 8 additions & 8 deletions repo/testLifecycleTask.dump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-compiler-native-image:test [Unknown]
- :kotlin-daemon-client:test [BuildToolsApi]
- :kotlin-gradle-plugin-integration-tests:kgpAllParallelTests [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_9_1_0 [Gradle]
Expand All @@ -443,7 +443,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpAndroidTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_9_1_0 [Gradle]
Expand All @@ -453,7 +453,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpDaemonsTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_9_1_0 [Gradle]
Expand All @@ -463,7 +463,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsBrowserTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_9_1_0 [Gradle]
Expand All @@ -473,7 +473,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJsTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_9_1_0 [Gradle]
Expand All @@ -483,7 +483,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpJvmTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_9_1_0 [Gradle]
Expand All @@ -493,7 +493,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpMppTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_9_1_0 [Gradle]
Expand All @@ -503,7 +503,7 @@ Not connected to any 'lifecycleTestTask':
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_9_5_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_9_6_1 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpNativeTestsForGradle_9_7_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpOtherTestsForGradle_7_4_2 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpOtherTestsForGradle_8_13 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpOtherTestsForGradle_8_14_5 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpOtherTestsForGradle_9_0_0 [Gradle]
- :kotlin-gradle-plugin-integration-tests:kgpOtherTestsForGradle_9_1_0 [Gradle]
Expand Down