routis
11/27/2023, 5:16 PMartspb
11/27/2023, 5:17 PMLandry Norris
11/27/2023, 5:17 PMroutis
11/27/2023, 5:20 PMroutis
11/27/2023, 5:26 PMgradle-kmp
for a lib project with a single target (jvm). In both layouts I put common code into src
and commonMain/kotlin
respectively. No matter the layout, my source code (in commonMain) keeps compiles despite it uses java packages.
I would expect that src
or commonMain
would compile only common platform code, when src@jvm
or jvmMain
are present.
Is this behavior a feature or a bug?Landry Norris
11/27/2023, 5:28 PMroutis
11/27/2023, 5:47 PMcommonMain
you cannot use java packages. For instance BigInteger cannot be used.
In the context of Amper ( in default layout, or in gradle-kmp
) I can use for instance BigInteger
in src
or in commonMain
for a lib project that targets only jvm
I was expecting a compilation error.Waldemar Kornewald
11/27/2023, 5:54 PMLandry Norris
11/27/2023, 5:56 PMLandry Norris
11/27/2023, 5:57 PMWaldemar Kornewald
11/27/2023, 5:59 PMWaldemar Kornewald
11/27/2023, 6:00 PMLandry Norris
11/27/2023, 6:02 PMWaldemar Kornewald
11/27/2023, 6:05 PMWaldemar Kornewald
11/27/2023, 6:06 PMLandry Norris
11/27/2023, 6:06 PMLandry Norris
11/27/2023, 6:07 PMWaldemar Kornewald
11/27/2023, 6:08 PM