mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[kotlin] K2: in scripts use projectSdk if there is any
GitOrigin-RevId: 4e332fa878ed5a85abd0f679ab6bf625b11e1848
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4ee04a3e95
commit
73d0177c8b
@@ -137,7 +137,13 @@ class K2ScriptDependenciesProvider(project: Project) : ScriptDependenciesProvide
|
||||
classes.addAll(toVfsRoots(configurationWrapper.dependenciesClassPath))
|
||||
sources.addAll(toVfsRoots(configurationWrapper.dependenciesSources))
|
||||
configurationWrapper.javaHome?.toPath()?.let {
|
||||
sdks[it] = ExternalSystemJdkUtil.lookupJdkByPath(it.pathString)
|
||||
val projectSdk = ProjectRootManager.getInstance(project).projectSdk
|
||||
|
||||
if (projectSdk != null && projectSdk.homePath == javaHome) {
|
||||
sdks[it] = projectSdk
|
||||
} else {
|
||||
sdks[it] = ExternalSystemJdkUtil.lookupJdkByPath(it.pathString)
|
||||
}
|
||||
}
|
||||
|
||||
counter++
|
||||
|
||||
Reference in New Issue
Block a user