https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
g

Guilherme Delgado

03/30/2021, 11:12 PM
Hello guys! I followed @John O'Reilly MortyComposeKMM regarding multiplatform-paging and it worked fine for android() and _ios(). But n_ow that i’ve added jvm() (wanna try server) I’m facing this problem: Could not resolve all files for configuration ’:shared:jvmCompileClasspath which basically happens because there’s no jvm() dependency from this lib. Can I somehow exclude this dependency (in commonMain) for jvm or the author must provide compatibility? Anyone facing similar problems? Thanks for your time!
b

Big Chungus

03/30/2021, 11:30 PM
Author must provide compatability
👍 1
z

zalewski.se

03/31/2021, 4:57 PM
Try not to provide it to commonMain, just to sourceSets that have compatibility with this lib
g

Guilherme Delgado

03/31/2021, 4:59 PM
thing is, my repository is in commonMain and it uses this lib to fetch paginated data from API so that view models can consume it as a flow
z

zalewski.se

03/31/2021, 5:01 PM
So you wanna exclude it from commonMain but still be able to use it in commonMain for jvm platform?
g

Guilherme Delgado

03/31/2021, 5:07 PM
i want to use it in commonMain so that repository may use. Also this lib is available for android() and ios() but not for jvm() and since jvm() will use commanMain it fails
z

zalewski.se

03/31/2021, 5:09 PM
Is repository separate module?
g

Guilherme Delgado

03/31/2021, 5:10 PM
no, is a commonMain class
z

zalewski.se

03/31/2021, 5:16 PM
Well either you wait for the author of this lib to provide compatibility or you provide this lib in android&ios sourceSets only and make your repository platform specific, hidden behind interface or expect/actual mechanism
👍 1