Hi there. I’m sorry I have a dumb question to whic...
# multiplatform
l
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
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
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
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
Is that in Intellij? I would guess it’s just not wired up. You should see kotlin.native.Throws
😮 1
l
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
I use
Copy code
configure([ios32Main, iosSimMain]) {
            dependsOn iosMain
        }
and actual for
iosMain
l
that’s what I had but impossible to see
kotlin.native.*
from my iosMain