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

Javier

05/25/2021, 11:08 AM
Is it possible to override
src/target/kotlin
? My idea is moving to
Copy code
project/common/Platform.kt
project/commonTest/PlatformTest.kt
project/ios/Platform.kt
project/iosTest/AnotherTest.kt
project/jvm/Platform.kt
project/jvmTest/AnotherTest.kt
...
project/build.gradle.kts
t

turansky

05/25/2021, 12:26 PM
Yes, it’s available via sourse sets
j

Javier

05/25/2021, 12:27 PM
do you have an example about it?
l

louiscad

05/25/2021, 12:28 PM
sourceSets* You can explore it inside the
kotlin
Gradle extension (aka.
KotlinMultiplatformExtension
in buildSrc)
j

Javier

05/25/2021, 12:29 PM
I explored it yesterday but I didn't find a way to avoid the usage of src and kotlin folders
l

louiscad

05/25/2021, 12:30 PM
You should be able to take one sourceSet (e.g. using
getByName
), and add any dir to it with
srcDir
👀 1
j

Javier

05/25/2021, 12:31 PM
Thank you both, I will try later :)
t

turansky

05/25/2021, 12:32 PM
Such folder manipulation exists in coroutines project too
And some plugins don’t respect “new source folder”
As result - we have different styles 😞
j

Javier

05/25/2021, 12:35 PM
3 Views