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

iamthevoid

06/25/2021, 10:47 AM
Did anybody check AppCode+KMM plugin? Quick look shows me that my scripts and sources from buildSrc folder not recognized by appcode+kmm-plugin. explanation: i created empty kmm project with kmm-plugin from appcode and starts to modify my current work project gradle scripts (in androidApp module) the same way as in new project. When i finally changed gradle script structure in my work project build starts fail with errors (
unresolved reference
from buildSrc sources). I miss something or AppCode doesn’t recognize buildSrc sources?
a

akapanina

06/25/2021, 10:52 AM
сс @Vyacheslav Karpukhin [JB]
i

iamthevoid

06/25/2021, 11:04 AM
Hm, i didn’t understand problem correct, it is not buildSrc issue
I decide that buildSrc is cause because i saw
minSdk (etc) not specified
and these dependencies was declared inside buildSrc. But problem was that gradle script not executed correctly, because of
platform
implementation
firebase-bom
Looks like multiplatform plugin doesn’t know how to implement
platform
-type dependency
v

Vyacheslav Karpukhin [JB]

06/25/2021, 11:51 AM
@iamthevoid In which gradle file this snippet with unresolved
platform()
is located?
i

iamthevoid

06/25/2021, 11:56 AM
To be clear: i started to modify androidApp build.gradle.kts the same way, like an in template new project. On screenshot above you can see 1. Script is
android:app / build.gradle.kts
2. I removed
kotlin("android")
and add
kotlin("multiplatform")
3. I move my
dependencies
block inside
kotlin { sourceSets { androidMain.dependencies { … } } }
Also i want to know about git-submodules. There is pure android library connected as submodule to kmm project. And all it’s modules has top-level android dependencies. Should i use kotlin-multiplatform plugin for this library too? Or i must upload it to remote repo and implement from this repo for avoid
top-level android dependencies
issues?
This git-submodule will always be pure android library, so that it is too strange migrate it from native android to multiplatform
v

Vyacheslav Karpukhin [JB]

06/25/2021, 1:09 PM
Got it, thanks. Looks like you are right and the root cause is the lack of the
platform
support for the dependencies in
kotlin-multiplatform
plugin. Could you report this to https://youtrack.jetbrains.com/issues/KMA, please? Regarding the submodules: they also need to be converted to
kotlin-multiplatform
, otherwise they won't be imported correctly by the IDE, and the code which uses these dependencies won't resolve.
i

iamthevoid

06/25/2021, 1:19 PM
Regarding the submodules: they also need to be converted to 
kotlin-multiplatform
Is it always be like that? Or it can be changed in future?
v

Vyacheslav Karpukhin [JB]

06/25/2021, 1:25 PM
This might change in the future, but at the moment we don't have this on our roadmap.
i

iamthevoid

06/25/2021, 2:13 PM
s

Sourabh Rawat

06/27/2021, 12:47 PM
Any workaround for the time being? Goal is to import a bom.