This_is_the_build_gradle_kts_file__not_sure_where_...
# multiplatform
m
This_is_the_build_gradle_kts_file__not_sure_where_I_need_to_add_any_particular_association_to_make_this_work___I_do_have_the_JVM_set_to__android___as_per_default_.txt
🧵 1
k
that's the name. it doesn't mean anything.
m
I guess I will take this to StackOverflow, I am not clear what you are describing, and don't want to consume this channel.
Pretty sure I need some config in the kotlin{} section of this gradle file, but I have no idea what that is supposed to be
k
if you want to use the android SDK, you have to make it an Android library. have you ever created an android library?
m
OK, that is good to know
l
@Mike Wolfson You want to read that documentation that covers Android support: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html
m
I did read that documentation and the portions of the gradle file that I need are just comments: '''plugins { id("com.android.library") kotlin("multiplatform").version("1.3.50") } android { /* ... */ } kotlin { android { // Create the Android target // Provide additional configuration if necessary } }'''
I have also searched GitHub to try and find a better example of this.
k
the android bits are the same as any android library
I am about to start working on a blog post that will address this specifically, but sadly it will be a few weeks before it would go live
l
This module depends on
buildSrc
content and supports Android, macOS and iOS: https://github.com/LouisCAD/Splitties/blob/5a12cda203e5c1069ef29528231cfd2dcb6d97e9/modules/preferences/build.gradle.kts IDE works fine for me in Android Studio 3.5.0 with Kotlin 1.3.50, for both Android and iOS/macOS sources. Trying it from your IDE might be helpful. Be sure to clone/download this revision or the develop branch.
m
Thanks for the example, I am sure that will be super helpful...especially since it looks like it is using the plugins DSL