Remove gradle testing import from gradle 3.x

This commit is contained in:
Andrey Uskov
2019-11-07 15:26:52 +03:00
parent 48f6207d26
commit 1f2767ae21
9 changed files with 3 additions and 66 deletions
@@ -20,10 +20,6 @@ import org.junit.Test
class HierarchicalMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportingTestCase() {
private fun kotlinVersion() = if (gradleKotlinPluginVersion == MINIMAL_SUPPORTED_VERSION) "1.3.50" else gradleKotlinPluginVersion
override fun isApplicableTest(): Boolean {
return !gradleVersion.startsWith("3.")
}
@Before
fun saveSdksBeforeTest() {
val kotlinSdks = sdkCreationChecker?.getKotlinSdks() ?: emptyList()
@@ -52,10 +52,6 @@ class MultiplatformProjectImportingTest : MultiplePluginVersionGradleImportingTe
assert(getModule(moduleName).getModuleWithDependenciesAndLibrariesScope(true).contains(file))
}
override fun isApplicableTest(): Boolean {
return shouldRunTest(gradleKotlinPluginVersion, gradleVersion)
}
@Test
fun testPlatformToCommonDependency() {
val files = configureByFiles()
@@ -5,15 +5,4 @@
package org.jetbrains.kotlin.gradle
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase.Companion.MINIMAL_SUPPORTED_VERSION
//BUNCH 181
fun MultiplatformProjectImportingTest.shouldRunTest(kotlinPluginVersion: String, gradleVersion: String): Boolean {
return MINIMAL_SUPPORTED_VERSION == kotlinPluginVersion
}
fun NewMultiplatformProjectImportingTest.shouldRunTest(kotlinPluginVersion: String, gradleVersion: String): Boolean {
return !gradleVersion.startsWith("3.")
}
fun KaptImportingTest.isAndroidStudio() = false
@@ -36,11 +36,6 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin
}
}
override fun isApplicableTest(): Boolean {
return shouldRunTest(gradleKotlinPluginVersion, gradleVersion)
}
@Test
fun testProjectDependency() {
configureByFiles()
@@ -39,11 +39,6 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin
}
}
override fun isApplicableTest(): Boolean {
return shouldRunTest(gradleKotlinPluginVersion, gradleVersion)
}
@Test
fun testProjectDependency() {
configureByFiles()
@@ -61,7 +61,7 @@ import static org.junit.Assume.assumeThat;
@RunWith(value = Parameterized.class)
public abstract class AbstractModelBuilderTest {
public static final Object[][] SUPPORTED_GRADLE_VERSIONS = {{"3.5"}, {"4.9"}};
public static final Object[][] SUPPORTED_GRADLE_VERSIONS = {{"4.9"}};
private static final Pattern TEST_METHOD_NAME_PATTERN = Pattern.compile("(.*)\\[(\\d*: with Gradle-.*)\\]");
@@ -60,7 +60,7 @@ import static org.junit.Assume.assumeThat;
@RunWith(value = Parameterized.class)
public abstract class AbstractModelBuilderTest {
public static final Object[][] SUPPORTED_GRADLE_VERSIONS = {{"3.5"}, {"4.9"}};
public static final Object[][] SUPPORTED_GRADLE_VERSIONS = {{"4.9"}};
private static final Pattern TEST_METHOD_NAME_PATTERN = Pattern.compile("(.*)\\[(\\d*: with Gradle-.*)\\]");
@@ -60,7 +60,7 @@ import static org.junit.Assume.assumeThat;
@RunWith(value = Parameterized.class)
public abstract class AbstractModelBuilderTest {
public static final Object[][] SUPPORTED_GRADLE_VERSIONS = {{"3.5"}, {"4.9"}};
public static final Object[][] SUPPORTED_GRADLE_VERSIONS = {{"4.9"}};
private static final Pattern TEST_METHOD_NAME_PATTERN = Pattern.compile("(.*)\\[(\\d*: with Gradle-.*)\\]");
@@ -355,26 +355,6 @@ class GradleConfiguratorTest : GradleImportingTestCase() {
}
}
@TargetVersions("3.5")
@Test
fun testAddLibraryGSKWithKotlinVersion() {
val files = importProjectFromTestData()
runInEdtAndWait {
myTestFixture.project.executeWriteCommand("") {
val stdLibVersion = KotlinWithGradleConfigurator.getKotlinStdlibVersion(myTestFixture.module)
KotlinWithGradleConfigurator.addKotlinLibraryToModule(
myTestFixture.module,
DependencyScope.COMPILE,
object : ExternalLibraryDescriptor("org.jetbrains.kotlin", "kotlin-reflect", stdLibVersion, stdLibVersion) {
override fun getLibraryClassesRoots() = emptyList<String>()
})
}
checkFiles(files)
}
}
@Test
fun testAddTestLibraryGSK() {
val files = importProjectFromTestData()
@@ -457,20 +437,6 @@ class GradleConfiguratorTest : GradleImportingTestCase() {
}
}
@TargetVersions("3.5")
@Test
fun testChangeCoroutinesSupportGSK() {
val files = importProjectFromTestData()
runInEdtAndWait {
myTestFixture.project.executeWriteCommand("") {
KotlinWithGradleConfigurator.changeCoroutineConfiguration(myTestFixture.module, "enable")
}
checkFiles(files)
}
}
@TargetVersions("4.4+")
@Test
fun testChangeCoroutinesSupportGSK49() {