Support Gradle 5.x in GradleInspectionTest

This commit is contained in:
Andrey Uskov
2019-11-19 19:47:33 +03:00
parent 21b9987a76
commit 937cffd273
5 changed files with 16 additions and 12 deletions
@@ -38,7 +38,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
Assert.assertEquals(1, problems.size) Assert.assertEquals(1, problems.size)
Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single()) Assert.assertEquals("Plugin version (1.3.20) is not the same as library version (1.3.30)", problems.single())
} }
@Test @Test
@@ -46,7 +46,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
Assert.assertEquals(1, problems.size) Assert.assertEquals(1, problems.size)
Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single()) Assert.assertEquals("Plugin version (1.3.20) is not the same as library version (1.3.30)", problems.single())
} }
@Test @Test
@@ -70,7 +70,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
Assert.assertEquals(1, problems.size) Assert.assertEquals(1, problems.size)
Assert.assertEquals("Plugin version (1.0.1) is not the same as library version (1.0.3)", problems.single()) Assert.assertEquals("Plugin version (1.3.10) is not the same as library version (1.3.30)", problems.single())
} }
@Test @Test
@@ -81,18 +81,20 @@ class GradleInspectionTest : GradleImportingTestCase() {
Assert.assertEquals(1, problems.size) Assert.assertEquals(1, problems.size)
Assert.assertEquals( Assert.assertEquals(
"Kotlin version that is used for building with Gradle (1.0.1) differs from the one bundled into the IDE plugin (\$PLUGIN_VERSION)", "Kotlin version that is used for building with Gradle (1.3.0) differs from the one bundled into the IDE plugin (\$PLUGIN_VERSION)",
problems.single() problems.single()
) )
} }
@Test @Test
@TargetVersions("4.9")
fun testJreInOldVersion() { fun testJreInOldVersion() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
Assert.assertTrue("The inspection result should be empty but contains the following elements: [$problems].", problems.isEmpty()) Assert.assertTrue("The inspection result should be empty but contains the following elements: [$problems].", problems.isEmpty())
} }
@Test @Test
@TargetVersions("4.9")
fun testJreIsDeprecated() { fun testJreIsDeprecated() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
@@ -104,6 +106,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
} }
@Test @Test
@TargetVersions("4.9")
fun testJreIsDeprecatedWithImplementation() { fun testJreIsDeprecatedWithImplementation() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
@@ -114,7 +117,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
) )
} }
@TargetVersions("4.9+") @TargetVersions("4.9")
@Test @Test
fun testJreIsDeprecatedWithoutImplicitVersion() { fun testJreIsDeprecatedWithoutImplicitVersion() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
@@ -141,6 +144,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
} }
@Test @Test
@TargetVersions("4.9")
fun testObsoleteCoroutinesUsage() { fun testObsoleteCoroutinesUsage() {
val problems = getInspectionResultFromTestDataProject() val problems = getInspectionResultFromTestDataProject()
@@ -1 +1 @@
test=1.0.1 test=1.3.0
@@ -9,12 +9,12 @@ buildscript {
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.2") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20")
} }
} }
apply plugin: 'kotlin' apply plugin: 'kotlin'
dependencies { dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.3" compile "org.jetbrains.kotlin:kotlin-stdlib:1.3.30"
} }
@@ -9,12 +9,12 @@ buildscript {
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.2") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20")
} }
} }
apply plugin: 'kotlin' apply plugin: 'kotlin'
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.0.3" implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.30"
} }
@@ -1,2 +1,2 @@
kotlin=1.0.1 kotlin=1.3.10
lib_version=1.0.3 lib_version=1.3.30