[Kotlin] Bump KGP version for non-MPP import tests

Relates to KTIJ-27067

GitOrigin-RevId: 6a11e673477722ad47c3cec5bbebfce9616ddc98
This commit is contained in:
Aleksei.Cherepanov
2024-06-26 13:24:00 +02:00
committed by intellij-monorepo-bot
parent 4fb30b4e18
commit 9d5f13ee75
27 changed files with 53 additions and 49 deletions

View File

@@ -29,6 +29,7 @@ import org.jetbrains.kotlin.idea.compiler.configuration.IdeKotlinVersion
import org.jetbrains.kotlin.idea.compiler.configuration.KotlinPluginLayout
import org.jetbrains.kotlin.idea.configuration.*
import org.jetbrains.kotlin.idea.configuration.notifications.LAST_BUNDLED_KOTLIN_COMPILER_VERSION_PROPERTY_NAME
import org.jetbrains.kotlin.idea.configuration.notifications.dropHotfixPart
import org.jetbrains.kotlin.idea.configuration.notifications.showNewKotlinCompilerAvailableNotificationIfNeeded
import org.jetbrains.kotlin.idea.gradleCodeInsightCommon.KotlinWithGradleConfigurator
import org.jetbrains.kotlin.idea.gradleJava.configuration.KotlinGradleModuleConfigurator
@@ -96,12 +97,15 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
}
val externalCompilerVersion = ExternalCompilerVersionProvider.findLatest(myProject)
assertEquals(
IdeKotlinVersion.get("1.3.70"),
ExternalCompilerVersionProvider.findLatest(myProject)
IdeKotlinVersion.get(LATEST_STABLE_GRADLE_PLUGIN_VERSION),
externalCompilerVersion
)
val expectedCountAfter = if (kotlinVersion.isRelease) 1 else 0
// Should show notification if the bundled version > external compiler version
val shouldShowNotification = kotlinVersion.isRelease && kotlinVersion.kotlinVersion.dropHotfixPart > externalCompilerVersion!!.kotlinVersion
val expectedCountAfter = if (shouldShowNotification) 1 else 0
runInEdtAndWait { NonBlockingReadActionImpl.waitForAsyncTaskCompletion() }
connection.deliverImmediately() // the first notification from import action
assertEquals(expectedCountAfter, counter.get())
@@ -118,7 +122,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
connection.deliverImmediately()
assertEquals(expectedCountAfter, counter.get())
if (kotlinVersion.isRelease) {
if (shouldShowNotification) {
assertTrue(propertiesComponent.isValueSet(propertyKey))
} else {
assertFalse(propertiesComponent.isValueSet(propertyKey))
@@ -179,7 +183,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureKotlinWithPluginsBlock() {
val files = importProjectFromTestData()
@@ -249,7 +253,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureJvmWithBuildGradle() {
val files = importProjectFromTestData()
@@ -273,7 +277,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureJvmWithBuildGradleKts() {
val files = importProjectFromTestData()
@@ -297,7 +301,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("5.6.4 <=> 6.7.1")
@TargetVersions("5.6.4 <=> 6.8.3")
fun testConfigureJvmMilestoneWithBuildGradle() {
val files = importProjectFromTestData()
@@ -321,7 +325,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("5.6.4 <=> 6.7.1")
@TargetVersions("5.6.4 <=> 6.8.3")
fun testConfigureJvmMilestoneWithBuildGradleKts() {
val files = importProjectFromTestData()
@@ -345,7 +349,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("5.6.4")
@TargetVersions("<=6.8.3")
fun testConfigureJvmKotlin17WithBuildGradleSourceCompat16() { // jvmTarget = 1.8 expected to be used instead of 1.6
val files = importProjectFromTestData()
@@ -369,7 +373,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("5.6.4")
@TargetVersions("<=6.8.3")
fun testConfigureJvmKotlin17WithBuildGradleTargetCompat16() { // jvmTarget = 1.8 expected to be used instead of 1.6
val files = importProjectFromTestData()
@@ -393,7 +397,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureAllModulesInJvmProjectGroovy() {
val files = importProjectFromTestData()
@@ -419,7 +423,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureAllModulesInJvmProjectKts() {
val files = importProjectFromTestData()
@@ -445,7 +449,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureRootModuleInJvmProjectGroovy() {
val files = importProjectFromTestData()
@@ -470,7 +474,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureRootModuleInJvmProjectKts() {
val files = importProjectFromTestData()
@@ -495,7 +499,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureSubModuleInJvmProjectGroovy() {
val files = importProjectFromTestData()
@@ -520,7 +524,7 @@ class GradleConfiguratorTest : KotlinGradleImportingTestCase() {
}
@Test
@TargetVersions("<=6.7.1")
@TargetVersions("<=6.8.3")
fun testConfigureSubModuleInJvmProjectKts() {
val files = importProjectFromTestData()

View File

@@ -387,9 +387,9 @@ abstract class KotlinGradleImportingTestCase : GradleImportingTestCase(),
companion object {
const val AFTER_SUFFIX = ".after"
const val LATEST_STABLE_GRADLE_PLUGIN_VERSION = "1.3.70"
const val LATEST_STABLE_GRADLE_PLUGIN_VERSION = "2.0.0"
val SUPPORTED_GRADLE_VERSIONS = arrayOf("5.6.4", "6.0.1", "6.7.1", "7.6")
val SUPPORTED_GRADLE_VERSIONS = arrayOf("6.8.3", "7.6")
// https://kotlinlang.org/docs/gradle-configure-project.html#targeting-the-jvm
val GRADLE_TO_KGP_VERSION = mapOf(

View File

@@ -11,5 +11,5 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}

View File

@@ -11,7 +11,7 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -11,5 +11,5 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}

View File

@@ -11,6 +11,6 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.0.0"
}

View File

@@ -3,6 +3,6 @@ plugins {
}
dependencies {
testCompile("junit:junit:4.12")
compile(kotlin("stdlib-jre8"))
testImplementation("junit:junit:4.12")
implementation(kotlin("stdlib-jre8"))
}

View File

@@ -3,7 +3,7 @@ plugins {
}
dependencies {
testCompile("junit:junit:4.12")
compile(kotlin("stdlib-jre8"))
testImplementation("junit:junit:4.12")
implementation(kotlin("stdlib-jre8"))
implementation(kotlin("reflect"))
}

View File

@@ -3,6 +3,6 @@ plugins {
}
dependencies {
testCompile("junit:junit:4.12")
compile(kotlin("stdlib-jre8"))
testImplementation("junit:junit:4.12")
implementation(kotlin("stdlib-jre8"))
}

View File

@@ -3,7 +3,7 @@ plugins {
}
dependencies {
testCompile("junit:junit:4.12")
compile(kotlin("stdlib-jre8"))
testImplementation("junit:junit:4.12")
implementation(kotlin("stdlib-jre8"))
implementation("org.a.b:lib:1.0.0")
}

View File

@@ -3,5 +3,5 @@ plugins {
}
dependencies {
compile(kotlin("stdlib-jre8"))
implementation(kotlin("stdlib-jre8"))
}

View File

@@ -3,7 +3,7 @@ plugins {
}
dependencies {
compile(kotlin("stdlib-jre8"))
implementation(kotlin("stdlib-jre8"))
testImplementation("junit:junit:4.12")
testImplementation(kotlin("test"))
}

View File

@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -11,7 +11,7 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -11,7 +11,7 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -13,5 +13,5 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}

View File

@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -13,5 +13,5 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}

View File

@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
compileKotlin {
kotlinOptions {

View File

@@ -11,5 +11,5 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-0.0" // intentionally invalid version
implementation "org.jetbrains.kotlin:kotlin-stdlib-0.0" // intentionally invalid version
}

View File

@@ -1 +1 @@
test={{kotlin_plugin_version}}
test=1.3.70

View File

@@ -16,5 +16,5 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: lib_version
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: lib_version
}

View File

@@ -9,12 +9,12 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:{{kotlin_plugin_version}}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
}
}
apply plugin: 'kotlin-platform-common'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-common"
implementation "org.jetbrains.kotlin:kotlin-stdlib-common"
}

View File

@@ -16,5 +16,5 @@ buildscript {
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7"
}