https://kotlinlang.org logo
#getting-started
Title
# getting-started
l

Lawrence

05/17/2022, 7:06 PM
Hello, I am migrating my Java modules + Gradle modules application to Kotlin. In one of my modules, I am getting all the packages in another module by
ModuleLayer.boot().findModule(moduleName)
. Now when I moved that code over to Kotlin, I noticed that particular module is not included in the ModuleLayer. I understand that Kotlin doesn't have an equivalent of
module-info.java
(I think) so does that mean this way of loading packages not gonna work in Kotlin?
1
v

Vampire

05/17/2022, 7:16 PM
You just keep the
module-info.java
in Java and
--patch-module
the compiled Kotlin classes into the module on Java compilation.
l

Lawrence

05/17/2022, 7:58 PM
I didn't even think to go that way. Thank you!
👌 1
e

ephemient

05/17/2022, 9:17 PM