Alexander Suslov
12/12/2018, 2:38 PMkonan
to the new kotlin-multiplatform
plugin.
Is it possible to have MPP library in the MPP project? I created an MPP library using IDEA's wizard, published it in maven local and tried to add to the project. But I have a gradle sync error: More than one file was found with OS independent path 'META-INF/FooMppLib.kotlin_module'
svyatoslav.scherbina
12/12/2018, 2:39 PMAlexander Suslov
12/12/2018, 3:02 PM//...
repositories {
//...
mavenLocal() // <==
}
//...
kotlin {
targets {
fromPreset(presets.android, 'android')
// This preset is for iPhone emulator
// Switch here to presets.iosArm64 (or iosArm32) to build library for iPhone device
fromPreset(presets.iosX64, 'ios') {
compilations.main.outputKinds('FRAMEWORK')
}
}
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
implementation 'com.example:FooMppLib-metadata:0.0.1' // <==
}
}
androidMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
implementation 'com.example:FooMppLib-jvm:0.0.1' // <==
}
}
//...
}
}
//...
svyatoslav.scherbina
12/12/2018, 3:18 PMcom.example:FooMppLib
to commonMain
.svyatoslav.scherbina
12/12/2018, 3:18 PMAlexander Suslov
12/12/2018, 4:45 PMSam
12/12/2018, 4:54 PMsvyatoslav.scherbina
12/13/2018, 6:20 AMAlexander Suslov
12/13/2018, 7:56 AMilya.matveev
12/21/2018, 9:07 AM