Refactor gradle importing tests. Add possibility to test various
versions of gradle kotlin plugin
This commit is contained in:
+7
-6
@@ -23,15 +23,14 @@ import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl
|
|||||||
import com.intellij.openapi.vfs.VirtualFile
|
import com.intellij.openapi.vfs.VirtualFile
|
||||||
import com.intellij.util.PathUtil
|
import com.intellij.util.PathUtil
|
||||||
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.facetSettings
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.facetSettings
|
||||||
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
||||||
import org.jetbrains.kotlin.idea.util.rootManager
|
import org.jetbrains.kotlin.idea.util.rootManager
|
||||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||||
import org.jetbrains.plugins.gradle.tooling.annotation.TargetVersions
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
class MultiplatformProjectImportingTest : MultiplePluginVersionGradleImportingTestCase() {
|
||||||
|
|
||||||
private fun legacyMode() = gradleVersion.split(".")[0].toInt() < 4
|
private fun legacyMode() = gradleVersion.split(".")[0].toInt() < 4
|
||||||
private fun getDependencyLibraryUrls(moduleName: String) =
|
private fun getDependencyLibraryUrls(moduleName: String) =
|
||||||
@@ -53,6 +52,10 @@ class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
assert(getModule(moduleName).getModuleWithDependenciesAndLibrariesScope(true).contains(file))
|
assert(getModule(moduleName).getModuleWithDependenciesAndLibrariesScope(true).contains(file))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun isApplicableTest(): Boolean {
|
||||||
|
return shouldRunTest(gradleKotlinPluginVersion, gradleVersion)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testPlatformToCommonDependency() {
|
fun testPlatformToCommonDependency() {
|
||||||
val files = configureByFiles()
|
val files = configureByFiles()
|
||||||
@@ -88,7 +91,7 @@ class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testPlatformToCommonExpectedByDependencyInComposite() {
|
fun testPlatformToCommonExpByInComposite() { // renamed from testPlatformToCommonExpectedByDependencyInComposite due to lack support of long names under Windows
|
||||||
configureByFiles()
|
configureByFiles()
|
||||||
importProject()
|
importProject()
|
||||||
|
|
||||||
@@ -293,10 +296,8 @@ class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//@TargetVersions("3.5")
|
|
||||||
@Test
|
@Test
|
||||||
fun testJsTestOutputFile() {
|
fun testJsTestOutputFile() {
|
||||||
// TODO fix for 4.9
|
|
||||||
configureByFiles()
|
configureByFiles()
|
||||||
|
|
||||||
importProject()
|
importProject()
|
||||||
|
|||||||
+12
-3
@@ -20,16 +20,17 @@ import com.intellij.openapi.roots.DependencyScope
|
|||||||
import com.intellij.openapi.roots.LibraryOrderEntry
|
import com.intellij.openapi.roots.LibraryOrderEntry
|
||||||
import com.intellij.openapi.roots.OrderRootType
|
import com.intellij.openapi.roots.OrderRootType
|
||||||
import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl
|
import com.intellij.openapi.roots.impl.ModuleOrderEntryImpl
|
||||||
|
import com.intellij.openapi.vfs.VirtualFile
|
||||||
import com.intellij.util.PathUtil
|
import com.intellij.util.PathUtil
|
||||||
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.facetSettings
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.facetSettings
|
||||||
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
||||||
import org.jetbrains.kotlin.idea.util.rootManager
|
import org.jetbrains.kotlin.idea.util.rootManager
|
||||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
class MultiplatformProjectImportingTest : MultiplePluginVersionGradleImportingTestCase() {
|
||||||
|
|
||||||
private fun legacyMode() = gradleVersion.split(".")[0].toInt() < 4
|
private fun legacyMode() = gradleVersion.split(".")[0].toInt() < 4
|
||||||
private fun getDependencyLibraryUrls(moduleName: String) =
|
private fun getDependencyLibraryUrls(moduleName: String) =
|
||||||
@@ -47,6 +48,14 @@ class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
assert(depOrderEntry.isProductionOnTestDependency == expected)
|
assert(depOrderEntry.isProductionOnTestDependency == expected)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun assertFileInModuleScope(file: VirtualFile, moduleName: String) {
|
||||||
|
assert(getModule(moduleName).getModuleWithDependenciesAndLibrariesScope(true).contains(file))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun isApplicableTest(): Boolean {
|
||||||
|
return shouldRunTest(gradleKotlinPluginVersion, gradleVersion)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testPlatformToCommonDependency() {
|
fun testPlatformToCommonDependency() {
|
||||||
val files = configureByFiles()
|
val files = configureByFiles()
|
||||||
@@ -72,7 +81,7 @@ class MultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testPlatformToCommonExpectedByDependencyInComposite() {
|
fun testPlatformToCommonExpByInComposite() { // renamed from testPlatformToCommonExpectedByDependencyInComposite due to lack support of long names under Windows
|
||||||
configureByFiles()
|
configureByFiles()
|
||||||
importProject()
|
importProject()
|
||||||
|
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.gradle
|
||||||
|
|
||||||
|
//BUNCH 181
|
||||||
|
fun MultiplatformProjectImportingTest.shouldRunTest(kotlinPluginVersion: String, gradleVersion: String): Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
fun NewMultiplatformProjectImportingTest.shouldRunTest(kotlinPluginVersion: String, gradleVersion: String): Boolean {
|
||||||
|
return !gradleVersion.startsWith("3.")
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.gradle
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
||||||
|
|
||||||
|
//BUNCH 181
|
||||||
|
fun MultiplatformProjectImportingTest.shouldRunTest(kotlinPluginVersion: String, gradleVersion: String): Boolean {
|
||||||
|
return kotlinPluginVersion != MultiplePluginVersionGradleImportingTestCase.MINIMAL_SUPPORTED_VERSION
|
||||||
|
}
|
||||||
|
|
||||||
|
fun NewMultiplatformProjectImportingTest.shouldRunTest(kotlinPluginVersion: String, gradleVersion: String): Boolean {
|
||||||
|
return !gradleVersion.startsWith("3.")
|
||||||
|
}
|
||||||
+52
-54
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.config.KotlinResourceRootType
|
|||||||
import org.jetbrains.kotlin.config.KotlinSourceRootType
|
import org.jetbrains.kotlin.config.KotlinSourceRootType
|
||||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.ExternalSystemImportingTestCase
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.ExternalSystemImportingTestCase
|
||||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.GradleImportingTestCase
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.GradleImportingTestCase
|
||||||
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
||||||
import org.jetbrains.kotlin.platform.impl.CommonIdePlatformKind
|
import org.jetbrains.kotlin.platform.impl.CommonIdePlatformKind
|
||||||
import org.jetbrains.kotlin.platform.impl.JsIdePlatformKind
|
import org.jetbrains.kotlin.platform.impl.JsIdePlatformKind
|
||||||
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
|
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
|
||||||
@@ -22,8 +23,8 @@ import org.junit.Before
|
|||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runners.Parameterized
|
import org.junit.runners.Parameterized
|
||||||
|
|
||||||
class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportingTestCase() {
|
||||||
private val kotlinVersion = "1.3.0-rc-146"
|
private fun kotlinVersion() = if (gradleKotlinPluginVersion == MINIMAL_SUPPORTED_VERSION) "1.3.0-rc-146" else gradleKotlinPluginVersion
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun saveSdksBeforeTest() {
|
fun saveSdksBeforeTest() {
|
||||||
@@ -40,6 +41,10 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun isApplicableTest(): Boolean {
|
||||||
|
return shouldRunTest(gradleKotlinPluginVersion, gradleVersion)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testProjectDependency() {
|
fun testProjectDependency() {
|
||||||
@@ -60,7 +65,7 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
module("app")
|
module("app")
|
||||||
module("app_commonMain") {
|
module("app_commonMain") {
|
||||||
platform(CommonIdePlatformKind.Platform)
|
platform(CommonIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
||||||
sourceFolder("app/src/commonMain/kotlin", KotlinSourceRootType.Source)
|
sourceFolder("app/src/commonMain/kotlin", KotlinSourceRootType.Source)
|
||||||
sourceFolder("app/src/commonMain/resources", KotlinResourceRootType.Resource)
|
sourceFolder("app/src/commonMain/resources", KotlinResourceRootType.Resource)
|
||||||
@@ -68,7 +73,7 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_commonTest") {
|
module("app_commonTest") {
|
||||||
platform(CommonIdePlatformKind.Platform)
|
platform(CommonIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("app_commonMain", DependencyScope.TEST)
|
moduleDependency("app_commonMain", DependencyScope.TEST)
|
||||||
sourceFolder("app/src/commonTest/kotlin", KotlinSourceRootType.TestSource)
|
sourceFolder("app/src/commonTest/kotlin", KotlinSourceRootType.TestSource)
|
||||||
@@ -77,8 +82,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_jsMain") {
|
module("app_jsMain") {
|
||||||
platform(JsIdePlatformKind.Platform)
|
platform(JsIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_jsMain", DependencyScope.COMPILE)
|
moduleDependency("lib_jsMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("app_commonMain", DependencyScope.COMPILE)
|
moduleDependency("app_commonMain", DependencyScope.COMPILE)
|
||||||
@@ -88,8 +93,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_jsTest") {
|
module("app_jsTest") {
|
||||||
platform(JsIdePlatformKind.Platform)
|
platform(JsIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("lib_jsMain", DependencyScope.TEST)
|
moduleDependency("lib_jsMain", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("app_commonMain", DependencyScope.TEST)
|
moduleDependency("app_commonMain", DependencyScope.TEST)
|
||||||
@@ -101,8 +106,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_jvmMain") {
|
module("app_jvmMain") {
|
||||||
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_jvmMain", DependencyScope.COMPILE)
|
moduleDependency("lib_jvmMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
||||||
@@ -114,8 +119,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_jvmTest") {
|
module("app_jvmTest") {
|
||||||
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
||||||
moduleDependency("lib_jvmMain", DependencyScope.TEST)
|
moduleDependency("lib_jvmMain", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
@@ -129,8 +134,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_main") {
|
module("app_main") {
|
||||||
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_8))
|
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_8))
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
||||||
sourceFolder("app/src/main/java", JavaSourceRootType.SOURCE)
|
sourceFolder("app/src/main/java", JavaSourceRootType.SOURCE)
|
||||||
@@ -140,8 +145,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("app_test") {
|
module("app_test") {
|
||||||
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_8))
|
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_8))
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("app_main", DependencyScope.TEST)
|
moduleDependency("app_main", DependencyScope.TEST)
|
||||||
@@ -153,14 +158,14 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
module("lib")
|
module("lib")
|
||||||
module("lib_commonMain") {
|
module("lib_commonMain") {
|
||||||
platform(CommonIdePlatformKind.Platform)
|
platform(CommonIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
sourceFolder("lib/src/commonMain/kotlin", KotlinSourceRootType.Source)
|
sourceFolder("lib/src/commonMain/kotlin", KotlinSourceRootType.Source)
|
||||||
sourceFolder("lib/src/commonMain/resources", KotlinResourceRootType.Resource)
|
sourceFolder("lib/src/commonMain/resources", KotlinResourceRootType.Resource)
|
||||||
inheritProjectOutput()
|
inheritProjectOutput()
|
||||||
}
|
}
|
||||||
module("lib_commonTest") {
|
module("lib_commonTest") {
|
||||||
platform(CommonIdePlatformKind.Platform)
|
platform(CommonIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
sourceFolder("lib/src/commonTest/kotlin", KotlinSourceRootType.TestSource)
|
sourceFolder("lib/src/commonTest/kotlin", KotlinSourceRootType.TestSource)
|
||||||
sourceFolder("lib/src/commonTest/resources", KotlinResourceRootType.TestResource)
|
sourceFolder("lib/src/commonTest/resources", KotlinResourceRootType.TestResource)
|
||||||
@@ -168,8 +173,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("lib_jsMain") {
|
module("lib_jsMain") {
|
||||||
platform(JsIdePlatformKind.Platform)
|
platform(JsIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
||||||
sourceFolder("lib/src/jsMain/kotlin", KotlinSourceRootType.Source)
|
sourceFolder("lib/src/jsMain/kotlin", KotlinSourceRootType.Source)
|
||||||
sourceFolder("lib/src/jsMain/resources", KotlinResourceRootType.Resource)
|
sourceFolder("lib/src/jsMain/resources", KotlinResourceRootType.Resource)
|
||||||
@@ -177,8 +182,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("lib_jsTest") {
|
module("lib_jsTest") {
|
||||||
platform(JsIdePlatformKind.Platform)
|
platform(JsIdePlatformKind.Platform)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonTest", DependencyScope.TEST)
|
moduleDependency("lib_commonTest", DependencyScope.TEST)
|
||||||
moduleDependency("lib_jsMain", DependencyScope.TEST)
|
moduleDependency("lib_jsMain", DependencyScope.TEST)
|
||||||
@@ -188,8 +193,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("lib_jvmMain") {
|
module("lib_jvmMain") {
|
||||||
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
moduleDependency("lib_commonMain", DependencyScope.COMPILE)
|
||||||
sourceFolder("lib/src/jvmMain/kotlin", JavaSourceRootType.SOURCE)
|
sourceFolder("lib/src/jvmMain/kotlin", JavaSourceRootType.SOURCE)
|
||||||
@@ -198,8 +203,8 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("lib_jvmTest") {
|
module("lib_jvmTest") {
|
||||||
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
platform(JvmIdePlatformKind.Platform(JvmTarget.JVM_1_6))
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonTest", DependencyScope.TEST)
|
moduleDependency("lib_commonTest", DependencyScope.TEST)
|
||||||
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
moduleDependency("lib_commonMain", DependencyScope.TEST)
|
||||||
@@ -289,9 +294,9 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
libraryDependency("Gradle: org.hamcrest:hamcrest-core:1.3@jar", DependencyScope.TEST)
|
libraryDependency("Gradle: org.hamcrest:hamcrest-core:1.3@jar", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.hamcrest:hamcrest-integration:1.3@jar", DependencyScope.TEST)
|
libraryDependency("Gradle: org.hamcrest:hamcrest-integration:1.3@jar", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.hamcrest:hamcrest-library:1.3@jar", DependencyScope.TEST)
|
libraryDependency("Gradle: org.hamcrest:hamcrest-library:1.3@jar", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion@jar", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}@jar", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion@jar", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion()}@jar", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion@jar", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}@jar", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0@jar", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0@jar", DependencyScope.COMPILE)
|
||||||
moduleDependency("shared", DependencyScope.COMPILE)
|
moduleDependency("shared", DependencyScope.COMPILE)
|
||||||
moduleDependency("shared_androidMain", DependencyScope.COMPILE)
|
moduleDependency("shared_androidMain", DependencyScope.COMPILE)
|
||||||
@@ -301,27 +306,27 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("shared")
|
module("shared")
|
||||||
module("shared_commonMain") {
|
module("shared_commonMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
sourceFolder("shared/src/commonMain/kotlin", KotlinSourceRootType.Source)
|
sourceFolder("shared/src/commonMain/kotlin", KotlinSourceRootType.Source)
|
||||||
sourceFolder("shared/src/commonMain/resources", KotlinResourceRootType.Resource)
|
sourceFolder("shared/src/commonMain/resources", KotlinResourceRootType.Resource)
|
||||||
}
|
}
|
||||||
module("shared_commonTest") {
|
module("shared_commonTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("shared_commonMain", DependencyScope.TEST)
|
moduleDependency("shared_commonMain", DependencyScope.TEST)
|
||||||
sourceFolder("shared/src/commonTest/kotlin", KotlinSourceRootType.TestSource)
|
sourceFolder("shared/src/commonTest/kotlin", KotlinSourceRootType.TestSource)
|
||||||
sourceFolder("shared/src/commonTest/resources", KotlinResourceRootType.TestResource)
|
sourceFolder("shared/src/commonTest/resources", KotlinResourceRootType.TestResource)
|
||||||
}
|
}
|
||||||
module("shared_androidMain") {
|
module("shared_androidMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.COMPILE)
|
||||||
moduleDependency("shared_commonMain", DependencyScope.COMPILE)
|
moduleDependency("shared_commonMain", DependencyScope.COMPILE)
|
||||||
sourceFolder("shared/src/androidMain/kotlin", JavaSourceRootType.SOURCE)
|
sourceFolder("shared/src/androidMain/kotlin", JavaSourceRootType.SOURCE)
|
||||||
sourceFolder("shared/src/androidMain/resources", JavaResourceRootType.RESOURCE)
|
sourceFolder("shared/src/androidMain/resources", JavaResourceRootType.RESOURCE)
|
||||||
}
|
}
|
||||||
module("shared_androidTest") {
|
module("shared_androidTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains:annotations:13.0", DependencyScope.TEST)
|
||||||
moduleDependency("shared_androidMain", DependencyScope.TEST)
|
moduleDependency("shared_androidMain", DependencyScope.TEST)
|
||||||
moduleDependency("shared_commonMain", DependencyScope.TEST)
|
moduleDependency("shared_commonMain", DependencyScope.TEST)
|
||||||
@@ -401,18 +406,18 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
module("project")
|
module("project")
|
||||||
module("aaa")
|
module("aaa")
|
||||||
module("aaa_commonMain") {
|
module("aaa_commonMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("bbb_commonMain", DependencyScope.COMPILE)
|
moduleDependency("bbb_commonMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
||||||
}
|
}
|
||||||
module("aaa_commonTest") {
|
module("aaa_commonTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("aaa_commonMain", DependencyScope.TEST)
|
moduleDependency("aaa_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("bbb_commonMain", DependencyScope.TEST)
|
moduleDependency("bbb_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
||||||
}
|
}
|
||||||
module("aaa_jvmMain") {
|
module("aaa_jvmMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("aaa_commonMain", DependencyScope.COMPILE)
|
moduleDependency("aaa_commonMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("bbb_commonMain", DependencyScope.COMPILE)
|
moduleDependency("bbb_commonMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("bbb_jvmMain", DependencyScope.COMPILE)
|
moduleDependency("bbb_jvmMain", DependencyScope.COMPILE)
|
||||||
@@ -420,7 +425,7 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
moduleDependency("ccc_jvmMain", DependencyScope.COMPILE)
|
moduleDependency("ccc_jvmMain", DependencyScope.COMPILE)
|
||||||
}
|
}
|
||||||
module("aaa_jvmTest") {
|
module("aaa_jvmTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("aaa_commonMain", DependencyScope.TEST)
|
moduleDependency("aaa_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("aaa_commonTest", DependencyScope.TEST)
|
moduleDependency("aaa_commonTest", DependencyScope.TEST)
|
||||||
moduleDependency("aaa_jvmMain", DependencyScope.TEST)
|
moduleDependency("aaa_jvmMain", DependencyScope.TEST)
|
||||||
@@ -431,22 +436,22 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("bbb")
|
module("bbb")
|
||||||
module("bbb_commonMain") {
|
module("bbb_commonMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
||||||
}
|
}
|
||||||
module("bbb_commonTest") {
|
module("bbb_commonTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("bbb_commonMain", DependencyScope.TEST)
|
moduleDependency("bbb_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
||||||
}
|
}
|
||||||
module("bbb_jvmMain") {
|
module("bbb_jvmMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("bbb_commonMain", DependencyScope.COMPILE)
|
moduleDependency("bbb_commonMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
||||||
moduleDependency("ccc_jvmMain", DependencyScope.COMPILE)
|
moduleDependency("ccc_jvmMain", DependencyScope.COMPILE)
|
||||||
}
|
}
|
||||||
module("bbb_jvmTest") {
|
module("bbb_jvmTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("bbb_commonMain", DependencyScope.TEST)
|
moduleDependency("bbb_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("bbb_commonTest", DependencyScope.TEST)
|
moduleDependency("bbb_commonTest", DependencyScope.TEST)
|
||||||
moduleDependency("bbb_jvmMain", DependencyScope.TEST)
|
moduleDependency("bbb_jvmMain", DependencyScope.TEST)
|
||||||
@@ -455,18 +460,18 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
module("ccc")
|
module("ccc")
|
||||||
module("ccc_commonMain") {
|
module("ccc_commonMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
}
|
}
|
||||||
module("ccc_commonTest") {
|
module("ccc_commonTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
||||||
}
|
}
|
||||||
module("ccc_jvmMain") {
|
module("ccc_jvmMain") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.COMPILE)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
moduleDependency("ccc_commonMain", DependencyScope.COMPILE)
|
||||||
}
|
}
|
||||||
module("ccc_jvmTest") {
|
module("ccc_jvmTest") {
|
||||||
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.0-rc-146", DependencyScope.TEST)
|
libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST)
|
||||||
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
moduleDependency("ccc_commonMain", DependencyScope.TEST)
|
||||||
moduleDependency("ccc_commonTest", DependencyScope.TEST)
|
moduleDependency("ccc_commonTest", DependencyScope.TEST)
|
||||||
moduleDependency("ccc_jvmMain", DependencyScope.TEST)
|
moduleDependency("ccc_jvmMain", DependencyScope.TEST)
|
||||||
@@ -502,11 +507,4 @@ class NewMultiplatformProjectImportingTest : GradleImportingTestCase() {
|
|||||||
override fun testDataDirName(): String {
|
override fun testDataDirName(): String {
|
||||||
return "newMultiplatformImport"
|
return "newMultiplatformImport"
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
@Parameterized.Parameters(name = "{index}: with Gradle-{0}")
|
|
||||||
@Throws(Throwable::class)
|
|
||||||
@JvmStatic
|
|
||||||
fun data() = listOf(arrayOf("4.8"))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,8 @@ class ModuleInfo(
|
|||||||
fun moduleDependency(moduleName: String, scope: DependencyScope) {
|
fun moduleDependency(moduleName: String, scope: DependencyScope) {
|
||||||
val moduleEntry = rootModel.orderEntries.filterIsInstance<ModuleOrderEntry>().singleOrNull { it.moduleName == moduleName }
|
val moduleEntry = rootModel.orderEntries.filterIsInstance<ModuleOrderEntry>().singleOrNull { it.moduleName == moduleName }
|
||||||
if (moduleEntry == null) {
|
if (moduleEntry == null) {
|
||||||
projectInfo.messageCollector.report("Module '${module.name}': No module dependency found: '$moduleName'")
|
val allModules = rootModel.orderEntries.filterIsInstance<ModuleOrderEntry>().map { it.moduleName }.joinToString(", ")
|
||||||
|
projectInfo.messageCollector.report("Module '${module.name}': No module dependency found: '$moduleName'. All module names: $allModules")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
checkDependencyScope(moduleEntry, scope)
|
checkDependencyScope(moduleEntry, scope)
|
||||||
|
|||||||
+5
-1
@@ -63,6 +63,7 @@ import java.io.StringWriter
|
|||||||
import java.net.URISyntaxException
|
import java.net.URISyntaxException
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import org.junit.AfterClass
|
import org.junit.AfterClass
|
||||||
|
import org.junit.Assume.assumeTrue
|
||||||
|
|
||||||
// part of org.jetbrains.plugins.gradle.importing.GradleImportingTestCase
|
// part of org.jetbrains.plugins.gradle.importing.GradleImportingTestCase
|
||||||
@RunWith(value = Parameterized::class)
|
@RunWith(value = Parameterized::class)
|
||||||
@@ -89,9 +90,12 @@ abstract class GradleImportingTestCase : ExternalSystemImportingTestCase() {
|
|||||||
private lateinit var myProjectSettings: GradleProjectSettings
|
private lateinit var myProjectSettings: GradleProjectSettings
|
||||||
private lateinit var myJdkHome: String
|
private lateinit var myJdkHome: String
|
||||||
|
|
||||||
|
open fun isApplicableTest(): Boolean = true
|
||||||
|
|
||||||
override fun setUp() {
|
override fun setUp() {
|
||||||
myJdkHome = IdeaTestUtil.requireRealJdkHome()
|
myJdkHome = IdeaTestUtil.requireRealJdkHome()
|
||||||
super.setUp()
|
super.setUp()
|
||||||
|
assumeTrue(isApplicableTest())
|
||||||
assumeThat(gradleVersion, versionMatcherRule.matcher)
|
assumeThat(gradleVersion, versionMatcherRule.matcher)
|
||||||
runWrite {
|
runWrite {
|
||||||
ProjectJdkTable.getInstance().findJdk(GRADLE_JDK_NAME)?.let {
|
ProjectJdkTable.getInstance().findJdk(GRADLE_JDK_NAME)?.let {
|
||||||
@@ -216,7 +220,7 @@ abstract class GradleImportingTestCase : ExternalSystemImportingTestCase() {
|
|||||||
return File(baseDir, getTestName(true).substringBefore("_"))
|
return File(baseDir, getTestName(true).substringBefore("_"))
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun configureByFiles(): List<VirtualFile> {
|
protected open fun configureByFiles(): List<VirtualFile> {
|
||||||
val rootDir = testDataDirectory()
|
val rootDir = testDataDirectory()
|
||||||
assert(rootDir.exists()) { "Directory ${rootDir.path} doesn't exist" }
|
assert(rootDir.exists()) { "Directory ${rootDir.path} doesn't exist" }
|
||||||
|
|
||||||
|
|||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This TestCase implements possibility to test import with different versions of gradle and different
|
||||||
|
* versions of gradle kotlin plugin
|
||||||
|
*/
|
||||||
|
package org.jetbrains.kotlin.idea.codeInsight.gradle
|
||||||
|
|
||||||
|
import com.intellij.openapi.vfs.VirtualFile
|
||||||
|
import org.junit.runners.Parameterized
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
abstract class MultiplePluginVersionGradleImportingTestCase : GradleImportingTestCase() {
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
@Parameterized.Parameter(1)
|
||||||
|
var gradleKotlinPluginVersion: String = MINIMAL_SUPPORTED_VERSION
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val MINIMAL_SUPPORTED_VERSION = "minimal"// minimal supported version
|
||||||
|
private val KOTLIN_GRADLE_PLUGIN_VERSIONS = listOf(MINIMAL_SUPPORTED_VERSION, "1.3.20")
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@Parameterized.Parameters(name = "{index}: Gradle-{0}, KotlinGradlePlugin-{1}")
|
||||||
|
fun data(): Collection<Array<Any>> {
|
||||||
|
return AbstractModelBuilderTest.SUPPORTED_GRADLE_VERSIONS.flatMap { gradleVersion ->
|
||||||
|
if ((gradleVersion[0] as String).startsWith("3.")) {
|
||||||
|
listOf(arrayOf<Any>(gradleVersion[0], MINIMAL_SUPPORTED_VERSION))
|
||||||
|
} else {
|
||||||
|
KOTLIN_GRADLE_PLUGIN_VERSIONS.map { kotlinVersion ->
|
||||||
|
arrayOf<Any>(
|
||||||
|
gradleVersion[0],
|
||||||
|
kotlinVersion
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}.toList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun configureByFiles(): List<VirtualFile> {
|
||||||
|
val result = ArrayList(super.configureByFiles())
|
||||||
|
result.add(
|
||||||
|
createProjectSubFile(
|
||||||
|
"include.gradle", """
|
||||||
|
String gradleKotlinPluginVersion(String defaultVersion) {
|
||||||
|
return ${if (gradleKotlinPluginVersion.isEmpty() || MINIMAL_SUPPORTED_VERSION == gradleKotlinPluginVersion) "defaultVersion;" else "\"$gradleKotlinPluginVersion\""}
|
||||||
|
}
|
||||||
|
ext {
|
||||||
|
gradleKotlinPluginVersion = this.&gradleKotlinPluginVersion
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+3
-1
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.0')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.51')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.51')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.51')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.0')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.0')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.0')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven { url 'http://dl.bintray.com/kotlin/kotlin-dev' }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.2.0-beta-74')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'kotlin'
|
||||||
+3
-1
@@ -6,7 +6,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0-beta-74")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.2.0-beta-74')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40-dev-610")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.2.40-dev-610')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
-12
@@ -1,12 +0,0 @@
|
|||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven { url 'http://dl.bintray.com/kotlin/kotlin-dev' }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0-beta-74")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'kotlin'
|
|
||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.2.41')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.51')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.1.51')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.31")
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.2.31')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -7,7 +7,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.10'
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.3.10')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -5,7 +5,9 @@ buildscript {
|
|||||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
|
apply from: "include.gradle"
|
||||||
|
def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146')
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user