Skip to content

Commit

Permalink
Use IDEA Project JDK first (#4689)
Browse files Browse the repository at this point in the history
getAvailableJdk checks for project Jdk first, then for the most recent Jdk version and finally the internal Jdk that could be JAVA_HOME

Fallback to JAVA_HOME may not be needed
  • Loading branch information
griffio authored and hfhbd committed Apr 2, 2024
1 parent 28370d9 commit 5f235bf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ internal class FileIndexMap {

Timber.i("Fetching SQLDelight models")
val javaHome = (
ExternalSystemJdkUtil.getJavaHome()
?: ExternalSystemJdkUtil.getAvailableJdk(project).second.homePath
ExternalSystemJdkUtil.getAvailableJdk(project).second.homePath
?: ExternalSystemJdkUtil.getJavaHome()
)?.let { File(it) }

val properties =
Expand Down

0 comments on commit 5f235bf

Please sign in to comment.