question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use of library from commonMain in Kotlin Multiplatform Project

See original GitHub issue

Describe the issue

I can include following for example as commonMain dependency in shared module of a Kotlin Multiplatform project and access/use code from JVM and Android code but if I try to use from commonMain source then only certain symbols appear to be resolvable (for example can access StaticCredentialsProvider but not DynamoDbClient). Perhaps this is expected right now?

api("aws.sdk.kotlin:dynamodb:0.9.4-beta")

Steps to Reproduce

per description

Current behavior

per description

AWS Kotlin SDK version used

0.9.4

Platform (JVM/JS/Native)

JVM/Android/Common

Operating System and version

macOS 11.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ianbotsfcommented, May 27, 2022

That’s correct @joreilly, this is a known issue. We’re in the final stages of changes which will remove the CRT as a required dependency and enable the AWS SDK for Kotlin to run on Apple M1 so hopefully that issue won’t be around much longer.

1reaction
ianbotsfcommented, May 24, 2022

The fix for this issue has been pushed to main and should be included in the next release (likely this week). With that release, it should be possible to reference service clients and related types from common source sets (instead of requiring JVM).

Note that the AWS SDK for Kotlin does yet not support non-JVM targets but they are on our roadmap as #228 and #229.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to use common kotlin library (not multiplatform ...
Currently it is not possible to publish a common-only library. You have to declare targets from the beginning.
Read more >
CommonMain sourceSet not indexing dependencies properly
Create a multiplatform project using the intellij wizard, gradle -> kotlin/multiplatform, with any artifact coordinate. Add a js and jvm target with normal ......
Read more >
Simple way to use common resources in Kotlin multi-platform ...
Simple way to use common resources in Kotlin multi-platform project · android() jvm("desktop") sourceSets · named("commonMain") · resources.srcDirs ...
Read more >
no build output compiled for common module of Kotlin ...
Do I understand right that you have a multiplatform library and some of multiplatform apps that depends on the lib? And app:commonMain can't...
Read more >
Introduction to Multiplatform Programming in Kotlin
This kotlin-multiplatform plugin configures the project for creating an application or library to work on multiple platforms.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found