Michael Paus
05/25/2025, 7:40 AMJAVA_PACKAGE_HOME must not be null.
This is due to a line in the script like this:
val JAVA_PACKAGE_HOME = System.getenv("JAVA_HOME_24_arm64") ?: System.getenv("JAVA_HOME_24_X64") ?: System.getenv("JAVA_HOME_24") ?: System.getenv("JAVA_HOME")
Obviously it is not properly substituting the environment variables where at least the last two are always define. Otherwise the project would not build at all.
So my question is:
Why is the plugin reading the script at all and why can’t it properly deal with the environment variables?
As a workaround I added ?: ""
to the line which seems to avoid the problem.
I reported a similar issue already some time ago but it still seems to exist in the latest version.
https://github.com/sqldelight/sqldelight/issues/4179#issuecomment-1652274841