Fix import library dependencies when transitive MPP are involved

Fix import dependencies of java modules on MPP modules when
project was not build before import. Unresolved jar dependencies
are not created any more on import of MPP project.
#KT-28822 Fixed
#KT-29757 Fixed
This commit is contained in:
Andrey Uskov
2019-07-24 17:49:08 +03:00
parent 0b8ad5c6c0
commit 91365d9fad
9 changed files with 238 additions and 7 deletions
@@ -0,0 +1,40 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.41' apply false
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
project('library1') {
apply plugin: 'kotlin-multiplatform'
kotlin { targets { fromPreset(presets.jvm, 'jvm') } }
}
project('library2') {
apply plugin: 'kotlin-multiplatform'
kotlin {
targets { fromPreset(presets.jvm, 'jvm') }
sourceSets {
jvmMain {
dependencies {
implementation project(':library1')
}
}
}
}
}
project('java-project') {
apply plugin: 'java'
dependencies {
implementation project(':library1')
implementation project(':library2')
}
}
@@ -0,0 +1,5 @@
rootProject.name = 'mpp-jardep'
include "java-project"
include "library1"
include "library2"
@@ -0,0 +1,20 @@
buildscript {
ext.kotlin_version = '1.3.41'
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
subprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
@@ -0,0 +1,5 @@
apply plugin: 'kotlin-platform-jvm'
dependencies {
compile project(':mpp')
}
@@ -0,0 +1,16 @@
apply plugin: 'kotlin-multiplatform'
apply plugin: 'maven-publish'
kotlin {
jvm()
sourceSets {
commonMain {
}
jvmMain {
}
}
}
version = "0.1.0-${System.currentTimeMillis()}"
@@ -0,0 +1,17 @@
apply plugin: 'kotlin-multiplatform'
apply plugin: 'maven-publish'
kotlin {
jvm()
sourceSets {
commonMain {
dependencies {
api project(':mpp-base')
}
}
jvmMain {
}
}
}
@@ -0,0 +1,6 @@
include('mpp-base')
include('mpp')
include('jvm')
enableFeaturePreview('STABLE_PUBLISHING')