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

Shan

01/12/2020, 1:28 AM
How would I specify a different name for
commonMain
in a mpp gradle file?
b

basher

01/12/2020, 2:08 AM
You can add other directories to the commonMain source set. Is that what you mean? https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#configuring-source-sets
☝🏼 1
And then you can skip using the folder named commonMain and use the extra one you added, if that's the goal
s

Shan

01/12/2020, 2:21 AM
Is it possible to add an extra one in this way that contains a dash between words? I can write
Copy code
val coreCommon by creating { }
but would prefer
core-common
to be the directory name.
In this case could I just skip setting up
commonMain
in the build file and it would not generate the directory?
b

basher

01/12/2020, 2:23 AM
Could try `val
core-common
by creating` if the issue is kotlin not liking the hyphen
Right I don't think it'll generate the directory. Should be able to skip
👍 1
s

Shan

01/12/2020, 2:26 AM
I suppose it's not that much difference if I can set the artifact name to
core-common
in the end. Having other build issues right now with trying to add an android library, so I'll see if it skips the
commonMain
directory once I'm able to build. 🙂 Thanks
👍 1