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

kyonifer

11/18/2018, 7:40 PM
is there a way to set the base name used for native targets using new-mpp? looks like
compilationName
and
name
are read-only. I'm trying to change the default name of the project that gets used throughout the generated
.h
file, but changing the project name to something else will affect the other platforms as well
s

serebit

11/18/2018, 7:58 PM
there is, let me take a look. i've done it before
actually, scratch that, i'm not sure. maybe someone else can chime in
k

kyonifer

11/18/2018, 8:12 PM
Thanks for looking at it anyway. As a workaround I can just make two projects
t

thevery

11/18/2018, 9:54 PM
Have you tried archivesBaseName?
Or you can try baseName.set("NAME")
k

kyonifer

11/19/2018, 2:52 AM
archivesBaseName
seems to not affect native targets. Using
baseName.set
inside of
components.main
is the trick that was working for me under the old-mpp dsl (kotlin-platform-native plugin) and I'm looking for a way to achieve the same under new-mpp (kotlin-multiplatform plugin). I can't find baseName settable on any scope I can think of: tried
KotlinMultiplatformExtension
,
KotlinNativeTarget
and
KotlinNativeCompilation
. Is there somewhere else in the new-mpp DSL it should go?
l

Liliia

11/20/2018, 5:27 AM
Not yet, but we’re working on it: https://youtrack.jetbrains.com/issue/KT-28313
16 Views