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.VfsTestUtil
|
||||||
import com.intellij.testFramework.runInEdtAndWait
|
import com.intellij.testFramework.runInEdtAndWait
|
||||||
import junit.framework.TestCase
|
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.KotlinTestUtils
|
||||||
import org.jetbrains.kotlin.test.TagsTestDataUtil
|
import org.jetbrains.kotlin.test.TagsTestDataUtil
|
||||||
import org.jetbrains.kotlin.test.TagsTestDataUtil.TagInfo
|
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.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class GradleMultiplatformHighlightingTest : GradleImportingTestCase() {
|
class GradleMultiplatformHighlightingTest : MultiplePluginVersionGradleImportingTestCase() {
|
||||||
|
|
||||||
@TargetVersions("4.7+")
|
|
||||||
@Test
|
@Test
|
||||||
|
@PluginTargetVersions(gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
||||||
fun testFirst() {
|
fun testFirst() {
|
||||||
doTest()
|
doTest()
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetVersions("4.7+")
|
|
||||||
@Test
|
@Test
|
||||||
|
@PluginTargetVersions(gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
||||||
fun testNoErrors() {
|
fun testNoErrors() {
|
||||||
doTest()
|
doTest()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
|||||||
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
||||||
import org.junit.Test
|
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() {
|
class ImportAndCheckNavigation : MultiplePluginVersionGradleImportingTestCase() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Vendored
+4
-6
@@ -1,21 +1,19 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
{{kts_kotlin_plugin_repositories}}
|
||||||
mavenCentral()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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 {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
{{kts_kotlin_plugin_repositories}}
|
||||||
mavenCentral()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
|||||||
Vendored
+2
-10
@@ -1,16 +1,8 @@
|
|||||||
pluginManagement {
|
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 {
|
repositories {
|
||||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
{{kts_kotlin_plugin_repositories}}
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rootProject.name = "test"
|
rootProject.name = "test"
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'kotlin-multiplatform' version '1.3.0'
|
id 'org.jetbrains.kotlin.multiplatform' version '{{kotlin_plugin_version}}'
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
{{kotlin_plugin_repositories}}
|
||||||
jcenter()
|
|
||||||
}
|
}
|
||||||
kotlin {
|
kotlin {
|
||||||
targets {
|
targets {
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
resolutionStrategy {
|
|
||||||
eachPlugin {
|
|
||||||
if (requested.id.id == "kotlin-multiplatform") {
|
|
||||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
{{kotlin_plugin_repositories}}
|
||||||
|
|
||||||
maven { url 'https://plugins.gradle.org/m2/' }
|
|
||||||
|
|
||||||
jcenter()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = 'first'
|
rootProject.name = 'first'
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
// NO_ERRORS_EXPECTED
|
// NO_ERRORS_EXPECTED
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'kotlin-multiplatform' version '1.3.0'
|
id 'org.jetbrains.kotlin.multiplatform' version '{{kotlin_plugin_version}}'
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
{{kotlin_plugin_repositories}}
|
||||||
jcenter()
|
|
||||||
}
|
}
|
||||||
kotlin {
|
kotlin {
|
||||||
targets {
|
targets {
|
||||||
|
|||||||
+1
-13
@@ -1,18 +1,6 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
resolutionStrategy {
|
|
||||||
eachPlugin {
|
|
||||||
if (requested.id.id == "kotlin-multiplatform") {
|
|
||||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
{{kotlin_plugin_repositories}}
|
||||||
|
|
||||||
maven { url 'https://plugins.gradle.org/m2/' }
|
|
||||||
|
|
||||||
jcenter()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = 'first'
|
rootProject.name = 'first'
|
||||||
Reference in New Issue
Block a user