Added the gradle plugin SNAPSHOT version support for some tests.
`ImportAndCheckNavigation` and `GradleMultiplatformHighlightingTest` now use the SNAPSHOT version of the gradle plugin also.
This commit is contained in:
+6
-5
@@ -26,25 +26,26 @@ import com.intellij.testFramework.ExpectedHighlightingData
|
||||
import com.intellij.testFramework.VfsTestUtil
|
||||
import com.intellij.testFramework.runInEdtAndWait
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.GradleImportingTestCase
|
||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.mppImportTestMinVersionForMaster
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.TagsTestDataUtil
|
||||
import org.jetbrains.kotlin.test.TagsTestDataUtil.TagInfo
|
||||
import org.jetbrains.plugins.gradle.tooling.annotation.TargetVersions
|
||||
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
|
||||
class GradleMultiplatformHighlightingTest : GradleImportingTestCase() {
|
||||
class GradleMultiplatformHighlightingTest : MultiplePluginVersionGradleImportingTestCase() {
|
||||
|
||||
@TargetVersions("4.7+")
|
||||
@Test
|
||||
@PluginTargetVersions(gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
||||
fun testFirst() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@TargetVersions("4.7+")
|
||||
@Test
|
||||
@PluginTargetVersions(gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
||||
fun testNoErrors() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@@ -18,9 +18,6 @@ import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
||||
import org.junit.Test
|
||||
|
||||
// TODO: run this test on the Gradle plugin from the current build
|
||||
// 1. specify appropriate 'pluginVersion' in [PluginTargetVersions]
|
||||
// 2. avoid using fixed Gradle plugin version in testdata
|
||||
class ImportAndCheckNavigation : MultiplePluginVersionGradleImportingTestCase() {
|
||||
|
||||
@Test
|
||||
|
||||
Vendored
+4
-6
@@ -1,21 +1,19 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
||||
mavenCentral()
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0-dev-7568") // TODO: use the Gradle plugin from the current build
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:{{kotlin_plugin_version}}")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
||||
mavenCentral()
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
Vendored
+2
-10
@@ -1,16 +1,8 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.name == "multiplatform") {
|
||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0-dev-7568") // TODO: use the Gradle plugin from the current build
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
||||
gradlePluginPortal()
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rootProject.name = "test"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
plugins {
|
||||
id 'kotlin-multiplatform' version '1.3.0'
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '{{kotlin_plugin_version}}'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
{{kotlin_plugin_repositories}}
|
||||
}
|
||||
kotlin {
|
||||
targets {
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "kotlin-multiplatform") {
|
||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
|
||||
jcenter()
|
||||
{{kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
rootProject.name = 'first'
|
||||
@@ -1,11 +1,9 @@
|
||||
// NO_ERRORS_EXPECTED
|
||||
|
||||
plugins {
|
||||
id 'kotlin-multiplatform' version '1.3.0'
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '{{kotlin_plugin_version}}'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
{{kotlin_plugin_repositories}}
|
||||
}
|
||||
kotlin {
|
||||
targets {
|
||||
|
||||
+1
-13
@@ -1,18 +1,6 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "kotlin-multiplatform") {
|
||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
|
||||
jcenter()
|
||||
{{kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
rootProject.name = 'first'
|
||||
Reference in New Issue
Block a user