So, I downloaded the OpenJDK source code for Java version 24. I've been able to add in my own modules and even compile and run my custom JDK. The issue however arises when I try to use Kotlin in the source code. I'm using Intelij Idea, and the IDE efficiently integrates the Kotlin and Java code, allow me to utilise code completion and all that. When I try to compile my code with the command "make images" is when I stumble upon errors. To begin with, packages containing only Kotlin code are considered empty when I try to export them via module-info.java files. Additionally, the Kotlin code is not compiled and references to Kotlin classes and whatnot cannot be resolved. I understand this may be because the JDK source code doesn't come with direct support for Kotlin, but I'm willing to bet there's a solution for it somewhere online, unfortunately, my search for such a solution has been unfruitful.
Any help on the matter will be highly appreciated. Whether this be you can guide me through adding Koltin support to the OpenJDK source code, or you can refer me to online documentation that can help. I understand directly integrating Kotlin into my JDK might not be the best for compatibility, but compatibility isn't an issue as progrrams written with my JDK will be run specifically with it and not other JDKs. Another thing I'd like help on is adding the Kotlin runtime library into the JDK as well. Seeing as I'll be integrating Kotlin into my code anyway, why not? I'm okay with solutions such as having to manually compile the Kotlin runtime, but if possible, I want guidance on simply grabbing a precompiled Kotlin runtime Jar archive and somehow adding it into the JDK. Once again, any help on the matter will be highly appreciated.
The solution I came to was to switch to Gradle as the build system. There's a bit of complication setting it up, but it works to some degree.