Fixed import of MPP modules with single artifacts

#KT-38037 Fixed
This commit is contained in:
Andrey Uskov
2020-05-11 23:40:01 +03:00
parent a8623b9b28
commit 2eb354f211
6 changed files with 170 additions and 0 deletions
@@ -0,0 +1,18 @@
buildscript {
repositories {
{{kotlin_plugin_repositories}}
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:{{kotlin_plugin_version}}")
{{extraPluginDependencies}}
}
}
allprojects {
repositories {
{{kotlin_plugin_repositories}}
}
}
@@ -0,0 +1,62 @@
apply plugin: 'kotlin-multiplatform'
apply plugin: 'maven-publish'
group 'org.jetbrains.qa.combompp'
buildscript {
repositories {
{{kotlin_plugin_repositories}}
}
}
repositories {
{{kotlin_plugin_repositories}}
}
kotlin {
jvm("jvm18") {
withJava()
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
}
sourceSets {
commonMain {
dependencies {
api kotlin('stdlib-common', '{{kotlin_plugin_version}}')
api kotlin('stdlib', '{{kotlin_plugin_version}}')
}
}
commonTest {
dependencies {
api kotlin('test-common', '{{kotlin_plugin_version}}')
api kotlin('test-annotations-common', '{{kotlin_plugin_version}}')
api kotlin('test', '{{kotlin_plugin_version}}')
}
}
// setting up the targets source sets
jvm18Main {
kotlin.srcDir('src/jvm18Main/customSrc')
dependencies {
implementation kotlin('stdlib-jdk8', '{{kotlin_plugin_version}}')
}
}
jvm18Test {
dependencies {
api kotlin('test')
api kotlin('test-junit')
}
}
}
}
dependencies {
jvm18TestApi "org.assertj:assertj-core:3.11.1"
}
@@ -0,0 +1,52 @@
group 'org.jetbrains.qa.combompp'
version '1.0'
apply plugin: 'kotlin-multiplatform'
apply plugin: 'maven-publish'
buildscript {
repositories {
{{kotlin_plugin_repositories}}
}
}
repositories {
{{kotlin_plugin_repositories}}
}
kotlin {
jvm("jvmWithJava") {
withJava()
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
}
sourceSets {
commonMain {
dependencies {
api project(":mpp-bottom-actual")
implementation kotlin('stdlib-common', '{{kotlin_plugin_version}}')
implementation kotlin('stdlib', '{{kotlin_plugin_version}}')
}
}
commonTest {
dependencies {
implementation kotlin('test-common', '{{kotlin_plugin_version}}')
implementation kotlin('test-annotations-common', '{{kotlin_plugin_version}}')
implementation kotlin('test', '{{kotlin_plugin_version}}')
}
}
jvmWithJavaMain {
dependencies {
}
}
jvmWithJavaTest {
dependencies {
implementation kotlin('test', '{{kotlin_plugin_version}}')
implementation kotlin('test-junit', '{{kotlin_plugin_version}}')
}
}
}
}
@@ -0,0 +1,9 @@
pluginManagement {
repositories {
{{kotlin_plugin_repositories}}
}
}
rootProject.name = 'KT38037'
include ':mpp-bottom-actual', ':mpp-mid-actual'
enableFeaturePreview('GRADLE_METADATA')