is there a way to share code between jvm and andro...
# multiplatform
a
is there a way to share code between jvm and android without creating a new module? something like commonJvm maybe? my multiplatform app has other non java targets so cant use common for it
j
Should be able to use something like
Copy code
applyDefaultHierarchyTemplate {
        common {
            group("jvmAndroid") {
                withAndroidTarget()
                withJvm()
            }
        }
    }
🧙 1
very nice 1
a
crazy. it "just works". thanks once again John!
👍 1
s
@John O'Reilly @Alex Styl I'm working on library in that I need to access class created in
macosMain
from
desktopMain
Copy code
applyDefaultHierarchyTemplate {
    common {
        group("desktopMain") {
            withMacos()
            withLinuxX64()
            withMingwX64()
        }
    }
}
I tried to write code from above example but it's not working Can you please help me with this?
Any help on this ?
a
what john mentioned worked for my case. havent used any of your config so hard to help
s
OK, will wait for John answer then
j
Hi @Swapnil Musale, I'm not sure either why you're seeing that issue. You might have more luck if you post it again in the main channel.