https://kotlinlang.org logo
l

ldavin

11/22/2018, 10:07 AM
Hi there. I’m sorry I have a dumb question to which I cannot find an answer. What’s the artifact signature containing a
Throws
annotation that’ll work on a native (ios) target ? I’m thinking of something like
org.jetbrains.kotlin:kotlin-stdlib-native
Are you sure there is one ?
b

Brian

11/22/2018, 10:27 AM
I asked this myself yesterday as well.
@Throws
seems to be JVM-specific: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-throws/index.html
l

ldavin

11/22/2018, 10:31 AM
I’m looking for the Throws annotation mentionned in the “Errors and exceptions” paragraph : https://github.com/JetBrains/kotlin-native/blob/master/OBJC_INTEROP.md#errors-and-exceptions
l

ldavin

11/22/2018, 10:35 AM
That’s probably it ! But what is the artefact signature so I can pull it from my build ?
I cannot see anything in the
kotlin.native
package from my native target, so I guess i’m missing an
implementation 'xxx'
k

kpgalligan

11/22/2018, 11:35 AM
Is that in Intellij? I would guess it’s just not wired up. You should see kotlin.native.Throws
😮 1
l

ldavin

11/22/2018, 12:37 PM
Ok I’ve found it 🤦. The problem was that I defined a “iosMain” sourceSet that my iosArm64 and iosX64 depend on, but this iosMain source set has no dependencies to anything
If anyone has the artifactgroupversion for the kotlin-native-runtime std lib, I could add it to my “common-ios” source set
until then I’ll have the
actual typealias Throws = kotlin.native.Throws
in both iosArm64 and iosX64 ¯\_(ツ)_/¯
👍 1
t

thevery

11/22/2018, 3:35 PM
I use
Copy code
configure([ios32Main, iosSimMain]) {
            dependsOn iosMain
        }
and actual for
iosMain
l

ldavin

11/22/2018, 4:39 PM
that’s what I had but impossible to see
kotlin.native.*
from my iosMain
2 Views