From 52815f5eb5f6177b59658f551ea241612c8ddca0 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 7 Nov 2018 12:53:36 +0300 Subject: [PATCH] Extract test files from GradleInspectionTest into testData --- .../gradle/GradleInspectionTest.kt | 371 ++---------------- .../differentKotlinGradleVersion/build.gradle | 14 + .../gradle.properties | 1 + .../differentStdlibGradleVersion/build.gradle | 18 + .../build.gradle | 18 + .../build.gradle | 18 + .../gradle.properties | 2 + .../build.gradle | 21 + .../build.gradle | 21 + .../inspections/jreInOldVersion/build.gradle | 18 + .../inspections/jreIsDeprecated/build.gradle | 18 + .../build.gradle | 18 + .../build.gradle | 18 + .../build.gradle | 21 + .../build.gradle | 21 + .../obsoleteCoroutinesUsage/build.gradle | 27 ++ 16 files changed, 276 insertions(+), 349 deletions(-) create mode 100644 idea/testData/gradle/inspections/differentKotlinGradleVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/differentKotlinGradleVersion/gradle.properties create mode 100644 idea/testData/gradle/inspections/differentStdlibGradleVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/differentStdlibGradleVersionWithImplementation/build.gradle create mode 100644 idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/build.gradle create mode 100644 idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/gradle.properties create mode 100644 idea/testData/gradle/inspections/differentStdlibJdk7GradleVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/differentStdlibJre7GradleVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/jreInOldVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/jreIsDeprecated/build.gradle create mode 100644 idea/testData/gradle/inspections/jreIsDeprecatedWithImplementation/build.gradle create mode 100644 idea/testData/gradle/inspections/jreIsDeprecatedWithoutImplicitVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/noDifferentStdlibCommonGradleVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/noDifferentStdlibJdk7GradleVersion/build.gradle create mode 100644 idea/testData/gradle/inspections/obsoleteCoroutinesUsage/build.gradle diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTest.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTest.kt index bd39763ef4d..049dcb6b4eb 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTest.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTest.kt @@ -32,32 +32,8 @@ import org.junit.Test class GradleInspectionTest : GradleImportingTestCase() { @Test fun testDifferentStdlibGradleVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.2") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.3" - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single()) @@ -65,32 +41,8 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testDifferentStdlibGradleVersionWithImplementation() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.2") - } - } - - apply plugin: 'kotlin' - - dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:1.0.3" - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single()) @@ -98,35 +50,8 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testDifferentStdlibJre7GradleVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - maven { - url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' - } - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-beta-17") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.0-beta-22" - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals("Plugin version (1.1.0-beta-17) is not the same as library version (1.1.0-beta-22)", problems.single()) @@ -134,35 +59,8 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testDifferentStdlibJdk7GradleVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - maven { - url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' - } - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-beta-17") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.1.0-beta-22" - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals("Plugin version (1.1.0-beta-17) is not the same as library version (1.1.0-beta-22)", problems.single()) @@ -170,37 +68,8 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testDifferentStdlibGradleVersionWithVariables() { - createProjectSubFile( - "gradle.properties", """ - |kotlin=1.0.1 - |lib_version=1.0.3""".trimMargin() - ) - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${'$'}kotlin") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: lib_version - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals("Plugin version (1.0.1) is not the same as library version (1.0.3)", problems.single()) @@ -208,30 +77,9 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testDifferentKotlinGradleVersion() { - createProjectSubFile("gradle.properties", """test=1.0.1""") - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${'$'}{test}") - } - } - - apply plugin: 'kotlin' - """ - ) - importProject() - val tool = DifferentKotlinGradleVersionInspection() tool.testVersionMessage = "\$PLUGIN_VERSION" - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals( @@ -242,64 +90,16 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testJreInOldVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.60") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.60" - } - """ - ) - importProject() - val tool = DeprecatedGradleDependencyInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.isEmpty()) } @Test fun testJreIsDeprecated() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.60") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0" - } - """ - ) - importProject() - val tool = DeprecatedGradleDependencyInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals( @@ -310,32 +110,8 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testJreIsDeprecatedWithImplementation() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0") - } - } - - apply plugin: 'kotlin' - - dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0" - } - """ - ) - importProject() - val tool = DeprecatedGradleDependencyInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals( @@ -347,33 +123,8 @@ class GradleInspectionTest : GradleImportingTestCase() { @TargetVersions("4.9+") @Test fun testJreIsDeprecatedWithoutImplicitVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jre8" - } - """ - ) - - importProject() - val tool = DeprecatedGradleDependencyInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals( @@ -384,111 +135,24 @@ class GradleInspectionTest : GradleImportingTestCase() { @Test fun testNoDifferentStdlibCommonGradleVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - maven { - url 'http://dl.bintray.com/kotlin/kotlin-eap' - } - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40-eap-51") - } - } - - apply plugin: 'kotlin-platform-common' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-common:1.2.40-eap-51" - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.toString(), problems.isEmpty()) } @Test fun testNoDifferentStdlibJdk7GradleVersion() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - maven { - url 'http://dl.bintray.com/kotlin/kotlin-eap' - } - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40-eap-51") - } - } - - apply plugin: 'kotlin' - - dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.40-eap-51" - } - """ - ) - importProject() - val tool = DifferentStdlibGradleVersionInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.toString(), problems.isEmpty()) } @Test fun testObsoleteCoroutinesUsage() { - val localFile = createProjectSubFile( - "build.gradle", """ - group 'Again' - version '1.0-SNAPSHOT' - - buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0") - } - } - - apply plugin: 'kotlin' - - repositories { - mavenCentral() - maven { url "https://kotlin.bintray.com/kotlinx" } - } - - dependencies { - compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.4' - } - - compileKotlin { - kotlinOptions.languageVersion = "1.3" - } - """ - ) - importProject() - val tool = GradleKotlinxCoroutinesDeprecationInspection() - val problems = getInspectionResult(tool, localFile) + val problems = getInspectionResultFromTestDataProject(tool) Assert.assertTrue(problems.size == 1) Assert.assertEquals( @@ -497,6 +161,11 @@ class GradleInspectionTest : GradleImportingTestCase() { ) } + private fun getInspectionResultFromTestDataProject(tool: LocalInspectionTool): List { + val buildGradle = importProjectFromTestData().find { it.name == "build.gradle" }!! + return getInspectionResult(tool, buildGradle) + } + private fun getInspectionResult(tool: LocalInspectionTool, file: VirtualFile): List { val resultRef = Ref>() invokeTestRunnable { @@ -512,4 +181,8 @@ class GradleInspectionTest : GradleImportingTestCase() { return resultRef.get() } + + override fun testDataDirName(): String { + return "inspections" + } } \ No newline at end of file diff --git a/idea/testData/gradle/inspections/differentKotlinGradleVersion/build.gradle b/idea/testData/gradle/inspections/differentKotlinGradleVersion/build.gradle new file mode 100644 index 00000000000..9514792202e --- /dev/null +++ b/idea/testData/gradle/inspections/differentKotlinGradleVersion/build.gradle @@ -0,0 +1,14 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${test}") + } +} + +apply plugin: 'kotlin' diff --git a/idea/testData/gradle/inspections/differentKotlinGradleVersion/gradle.properties b/idea/testData/gradle/inspections/differentKotlinGradleVersion/gradle.properties new file mode 100644 index 00000000000..298b41a3e2f --- /dev/null +++ b/idea/testData/gradle/inspections/differentKotlinGradleVersion/gradle.properties @@ -0,0 +1 @@ +test=1.0.1 \ No newline at end of file diff --git a/idea/testData/gradle/inspections/differentStdlibGradleVersion/build.gradle b/idea/testData/gradle/inspections/differentStdlibGradleVersion/build.gradle new file mode 100644 index 00000000000..475abbc9577 --- /dev/null +++ b/idea/testData/gradle/inspections/differentStdlibGradleVersion/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.2") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.3" +} diff --git a/idea/testData/gradle/inspections/differentStdlibGradleVersionWithImplementation/build.gradle b/idea/testData/gradle/inspections/differentStdlibGradleVersionWithImplementation/build.gradle new file mode 100644 index 00000000000..657e98c3ebb --- /dev/null +++ b/idea/testData/gradle/inspections/differentStdlibGradleVersionWithImplementation/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.2") + } +} + +apply plugin: 'kotlin' + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib:1.0.3" +} diff --git a/idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/build.gradle b/idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/build.gradle new file mode 100644 index 00000000000..d21a71f6eef --- /dev/null +++ b/idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: lib_version +} diff --git a/idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/gradle.properties b/idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/gradle.properties new file mode 100644 index 00000000000..ca968b3c807 --- /dev/null +++ b/idea/testData/gradle/inspections/differentStdlibGradleVersionWithVariables/gradle.properties @@ -0,0 +1,2 @@ +kotlin=1.0.1 +lib_version=1.0.3 \ No newline at end of file diff --git a/idea/testData/gradle/inspections/differentStdlibJdk7GradleVersion/build.gradle b/idea/testData/gradle/inspections/differentStdlibJdk7GradleVersion/build.gradle new file mode 100644 index 00000000000..180e5747b8b --- /dev/null +++ b/idea/testData/gradle/inspections/differentStdlibJdk7GradleVersion/build.gradle @@ -0,0 +1,21 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + maven { + url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' + } + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-beta-17") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.1.0-beta-22" +} diff --git a/idea/testData/gradle/inspections/differentStdlibJre7GradleVersion/build.gradle b/idea/testData/gradle/inspections/differentStdlibJre7GradleVersion/build.gradle new file mode 100644 index 00000000000..1371971ece6 --- /dev/null +++ b/idea/testData/gradle/inspections/differentStdlibJre7GradleVersion/build.gradle @@ -0,0 +1,21 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + maven { + url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' + } + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-beta-17") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.0-beta-22" +} diff --git a/idea/testData/gradle/inspections/jreInOldVersion/build.gradle b/idea/testData/gradle/inspections/jreInOldVersion/build.gradle new file mode 100644 index 00000000000..4d1e61c137e --- /dev/null +++ b/idea/testData/gradle/inspections/jreInOldVersion/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.60") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.60" +} diff --git a/idea/testData/gradle/inspections/jreIsDeprecated/build.gradle b/idea/testData/gradle/inspections/jreIsDeprecated/build.gradle new file mode 100644 index 00000000000..9a28826bd50 --- /dev/null +++ b/idea/testData/gradle/inspections/jreIsDeprecated/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.60") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0" +} diff --git a/idea/testData/gradle/inspections/jreIsDeprecatedWithImplementation/build.gradle b/idea/testData/gradle/inspections/jreIsDeprecatedWithImplementation/build.gradle new file mode 100644 index 00000000000..1b6e584664d --- /dev/null +++ b/idea/testData/gradle/inspections/jreIsDeprecatedWithImplementation/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0") + } +} + +apply plugin: 'kotlin' + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0" +} diff --git a/idea/testData/gradle/inspections/jreIsDeprecatedWithoutImplicitVersion/build.gradle b/idea/testData/gradle/inspections/jreIsDeprecatedWithoutImplicitVersion/build.gradle new file mode 100644 index 00000000000..b0bce5605c4 --- /dev/null +++ b/idea/testData/gradle/inspections/jreIsDeprecatedWithoutImplicitVersion/build.gradle @@ -0,0 +1,18 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8" +} diff --git a/idea/testData/gradle/inspections/noDifferentStdlibCommonGradleVersion/build.gradle b/idea/testData/gradle/inspections/noDifferentStdlibCommonGradleVersion/build.gradle new file mode 100644 index 00000000000..73f5a13c72a --- /dev/null +++ b/idea/testData/gradle/inspections/noDifferentStdlibCommonGradleVersion/build.gradle @@ -0,0 +1,21 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + maven { + url 'http://dl.bintray.com/kotlin/kotlin-eap' + } + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40-eap-51") + } +} + +apply plugin: 'kotlin-platform-common' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-common:1.2.40-eap-51" +} diff --git a/idea/testData/gradle/inspections/noDifferentStdlibJdk7GradleVersion/build.gradle b/idea/testData/gradle/inspections/noDifferentStdlibJdk7GradleVersion/build.gradle new file mode 100644 index 00000000000..422b710fd65 --- /dev/null +++ b/idea/testData/gradle/inspections/noDifferentStdlibJdk7GradleVersion/build.gradle @@ -0,0 +1,21 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + maven { + url 'http://dl.bintray.com/kotlin/kotlin-eap' + } + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40-eap-51") + } +} + +apply plugin: 'kotlin' + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.40-eap-51" +} diff --git a/idea/testData/gradle/inspections/obsoleteCoroutinesUsage/build.gradle b/idea/testData/gradle/inspections/obsoleteCoroutinesUsage/build.gradle new file mode 100644 index 00000000000..d15ae9aaa48 --- /dev/null +++ b/idea/testData/gradle/inspections/obsoleteCoroutinesUsage/build.gradle @@ -0,0 +1,27 @@ +group 'Again' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0") + } +} + +apply plugin: 'kotlin' + +repositories { + mavenCentral() + maven { url "https://kotlin.bintray.com/kotlinx" } +} + +dependencies { + compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.4' +} + +compileKotlin { + kotlinOptions.languageVersion = "1.3" +}