kpgalligan
11/26/2018, 2:42 PMkenkyee
11/26/2018, 2:53 PMjanvladimirmostert
11/26/2018, 3:27 PMaddamsson
11/27/2018, 9:32 AMkotlin-multiplatform
plugin) using Dokka?pajatopmr
11/27/2018, 11:49 AMbenleggiero
11/28/2018, 3:00 AM@Throws
. Does Kotlin/JS have something like that?kpgalligan
11/28/2018, 6:13 PMmenegatti
11/29/2018, 1:51 PMSystem.getCurrentTimeMillis()
?menegatti
11/29/2018, 5:16 PMApi
in common
, an implementation of it based on Ktor in mobileCommon
and something else for windows?menegatti
11/30/2018, 11:59 AMkevinskrei
11/30/2018, 5:54 PMpajatopmr
12/01/2018, 7:42 AMmenegatti
12/02/2018, 2:13 PMModule not found: Error: Can't resolve 'common' in (...)
even though it is properly defined in gradle. Any idea why would this happen?judrummer
12/03/2018, 12:49 PMSam
12/03/2018, 6:23 PMkevinskrei
12/04/2018, 12:53 AMactual fun platformName(): String {
return "Android"
}
import platform.UIKit.UIDevice
actual fun platformName(): String {
return UIDevice.currentDevice.systemName() +
" " +
UIDevice.currentDevice.systemVersion
}
Steven
12/05/2018, 6:24 PMmenegatti
12/05/2018, 9:35 PMcommon/build.gradle
file is :
apply plugin: 'kotlin-multiplatform'
kotlin {
targets {
fromPreset(presets.jvm, 'jvm')
final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
? presets.iosArm64 : presets.iosX64
fromPreset(iOSTarget, 'iOS') {
compilations.main.outputKinds('FRAMEWORK')
}
}
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version"
}
}
jvmMain {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
}
}
iOSMain {
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version"
}
}
}
}
addamsson
12/06/2018, 10:03 AMserebit
12/06/2018, 7:08 PM@Test
fun shouldMatchPath() {
assertEquals(true, true)
}
This common test (in commonTest source set) fails on Kotlin multiplatform 1.3.11. It doesn't run in JVM, and it fails in the linux source set.serebit
12/06/2018, 8:24 PMorangy
12/06/2018, 8:30 PMcoletz
12/07/2018, 9:46 AMserebit
12/08/2018, 5:35 AMposix
source set that has access to platform.posix
, which both macos
and linux
depend on? Or do I just have to copy-paste everything between the two source sets.
Edit: Seems like it's possible, but IntelliJ doesn't seem to like it.Dominaezzz
12/08/2018, 3:31 PMimplementation 'org.jetbrains.kotlinx:kotlinx-io:0.1.2-multiplatform-dev-4'
) dependency on the common source set but the jvm and native variants resolve just fine. Is that valid or is it called something else?Dominaezzz
12/08/2018, 5:52 PMserebit
12/08/2018, 11:23 PMgoncalossilva
12/09/2018, 2:13 PMKClass::isOpen
is marked as being available in Common: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/is-open.html
However, when trying to use it in a common test, it fails to compile in (at least) JS and Native. Any clues why?
JS:
Unsupported [This reflection API is not supported yet in JavaScript]Native:
error: unresolved reference: isOpenShould this work?
tapchicoma
12/09/2018, 10:07 PMgoncalossilva
12/11/2018, 4:55 AMgoncalossilva
12/11/2018, 4:55 AMgildor
12/11/2018, 4:57 AMgoncalossilva
12/11/2018, 5:01 AM