From a106085e67f8d47839fa5441639c640e780cba7e Mon Sep 17 00:00:00 2001 From: Andrey Uskov Date: Fri, 15 Feb 2019 13:27:07 +0300 Subject: [PATCH] Update kotlin gradle plugin used in import tests --- .../NewMultiplatformProjectImportingTest.kt | 10 ++--- .../androidDependencyOnMPP/app/build.gradle | 6 ++- .../androidDependencyOnMPP/build.gradle | 5 +-- .../fileCollectionDependency/build.gradle | 2 +- .../nestedDependencies/build.gradle | 2 +- .../build.gradle | 2 +- .../toInclude/build.gradle | 38 ++++++++++--------- .../projectDependency/build.gradle | 2 +- .../unresolvedDependency/build.gradle | 2 +- 9 files changed, 37 insertions(+), 32 deletions(-) diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt index a7751cad889..e2e6bd0932e 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt @@ -22,7 +22,7 @@ import org.junit.Before import org.junit.Test class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportingTestCase() { - private fun kotlinVersion() = if (gradleKotlinPluginVersion == MINIMAL_SUPPORTED_VERSION) "1.3.0-rc-146" else gradleKotlinPluginVersion + private fun kotlinVersion() = if (gradleKotlinPluginVersion == MINIMAL_SUPPORTED_VERSION) "1.3.10" else gradleKotlinPluginVersion @Before fun saveSdksBeforeTest() { @@ -333,18 +333,18 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin sourceFolder("shared/src/androidTest/resources", JavaResourceRootType.TEST_RESOURCE) } var nativeVersion = when (gradleKotlinPluginVersion) { - MINIMAL_SUPPORTED_VERSION -> "1.0.2" - else -> "1.1.1" + MINIMAL_SUPPORTED_VERSION -> "1.3.10" + else -> "1.3.20" } module("shared_iOSMain") { - libraryDependency("Gradle: Kotlin/Native:stdlib:$nativeVersion", DependencyScope.COMPILE) + libraryDependency("Kotlin/Native $nativeVersion - stdlib", DependencyScope.PROVIDED) libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.COMPILE) moduleDependency("shared_commonMain", DependencyScope.COMPILE) sourceFolder("shared/src/iOSMain/kotlin", KotlinSourceRootType.Source) sourceFolder("shared/src/iOSMain/resources", KotlinResourceRootType.Resource) } module("shared_iOSTest") { - libraryDependency("Gradle: Kotlin/Native:stdlib:$nativeVersion", DependencyScope.TEST) + libraryDependency("Kotlin/Native $nativeVersion - stdlib", DependencyScope.PROVIDED) libraryDependency("Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion()}", DependencyScope.TEST) moduleDependency("shared_iOSMain", DependencyScope.TEST) moduleDependency("shared_commonMain", DependencyScope.TEST) diff --git a/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/app/build.gradle b/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/app/build.gradle index d69642651e6..ff1e59366de 100644 --- a/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/app/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/app/build.gradle @@ -22,10 +22,14 @@ android { } } +apply from: "../include.gradle" +def kotlinVersion = gradleKotlinPluginVersion('1.3.10') + + dependencies { implementation project(':shared') implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0-rc-146" + implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}" implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' diff --git a/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/build.gradle b/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/build.gradle index 4f93ca197d8..38c087d7d15 100644 --- a/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/androidDependencyOnMPP/build.gradle @@ -1,5 +1,6 @@ buildscript { - ext.kotlin_version = '1.3.0-rc-146' + apply from: "include.gradle" + def kotlinVersion = gradleKotlinPluginVersion('1.3.10') repositories { google() jcenter() @@ -7,8 +8,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' - apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } diff --git a/idea/testData/gradle/newMultiplatformImport/fileCollectionDependency/build.gradle b/idea/testData/gradle/newMultiplatformImport/fileCollectionDependency/build.gradle index ed9496b09fa..61eddfadff3 100644 --- a/idea/testData/gradle/newMultiplatformImport/fileCollectionDependency/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/fileCollectionDependency/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146') + def kotlinVersion = gradleKotlinPluginVersion('1.3.10') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } diff --git a/idea/testData/gradle/newMultiplatformImport/nestedDependencies/build.gradle b/idea/testData/gradle/newMultiplatformImport/nestedDependencies/build.gradle index f74eeb6a739..09249e0d4c9 100644 --- a/idea/testData/gradle/newMultiplatformImport/nestedDependencies/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/nestedDependencies/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146') + def kotlinVersion = gradleKotlinPluginVersion('1.3.10') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } diff --git a/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/build.gradle b/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/build.gradle index 21f7734d121..e3f2aed4bff 100644 --- a/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.2.0-beta-74') + def kotlinVersion = gradleKotlinPluginVersion('1.3.20') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } diff --git a/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/toInclude/build.gradle b/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/toInclude/build.gradle index 834a4af4c5e..aade74704b5 100644 --- a/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/toInclude/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/platformToCommonExpByInComposite/toInclude/build.gradle @@ -1,4 +1,3 @@ - buildscript { repositories { mavenCentral() @@ -6,28 +5,31 @@ buildscript { } dependencies { - apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.2.0-beta-74') + apply from: "../include.gradle" + def kotlinVersion = gradleKotlinPluginVersion('1.3.20') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } -project('common') { - apply plugin: 'kotlin-platform-common' -} -project('jvm') { - apply plugin: 'kotlin-platform-jvm' +apply plugin: 'kotlin-multiplatform' - dependencies { - expectedBy project(':common') - } -} - -project('js') { - apply plugin: 'kotlin-platform-js' - - dependencies { - expectedBy project(':common') + +kotlin { + jvm() + js() + sourceSets { + commonMain { + } + commonTest { + } + jvmMain { + } + jvmTest { + } + jsMain { + } + jsTest { + } } } diff --git a/idea/testData/gradle/newMultiplatformImport/projectDependency/build.gradle b/idea/testData/gradle/newMultiplatformImport/projectDependency/build.gradle index 5c5f7ba5f99..6f47e25c09d 100644 --- a/idea/testData/gradle/newMultiplatformImport/projectDependency/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/projectDependency/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146') + def kotlinVersion = gradleKotlinPluginVersion('1.3.10') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } diff --git a/idea/testData/gradle/newMultiplatformImport/unresolvedDependency/build.gradle b/idea/testData/gradle/newMultiplatformImport/unresolvedDependency/build.gradle index a930ced8f98..3d0d0cd4ac1 100644 --- a/idea/testData/gradle/newMultiplatformImport/unresolvedDependency/build.gradle +++ b/idea/testData/gradle/newMultiplatformImport/unresolvedDependency/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { apply from: "include.gradle" - def kotlinVersion = gradleKotlinPluginVersion('1.3.0-rc-146') + def kotlinVersion = gradleKotlinPluginVersion('1.3.10') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } }