KotlinBuildScriptDependenciesResolver should return valid javaHome #1354
Comments
This will ship in Gradle 5.4 |
@NataliaUkhorskaya, this shipped in Gradle 5.4 Could it be related? |
@eskatos This looks like a Java 10+ issue. I'm guessing you wouldn't see that problem if the language version was set to Java 8. Just a thought. |
Using Java 8 in some places makes the problem go away... |
The scripts already use Java 8 language version. But yes, if the build is imported using Java 11 then this problem shows up, it doesn't happen if the build was imported using Java 8. |
In my comment above it worked for me importing with Java 8 because both Gradle The root problem is that the Kotlin DSL IDEA script editor can't find JDK classes with Gradle 5.4 if Gradle JVM != Project SDK. See gradle/gradle#9195 |
KotlinBuildScriptDependenciesResolver
should containsjavaHome
in the returned script dependencies. Otherwisegradle.kts
scripts can be highlighted with errors if non-java sdk is set as Project SDK in Intellij IDEArelated tiked: https://youtrack.jetbrains.com/issue/KT-21501
Expected Behavior
ScriptDependencies.javaHome
is set to some valid value. It can be obtained fromenvironment
parameter passed intoresolve
method.Current Behavior
javaHome
is nullThe text was updated successfully, but these errors were encountered: