Pill: Import Java toolchain configuration correctly

Before, all project modules used 'inheritedJdk'. However, some Kotlin
modules now require JDK 8, while others depend on new API in JDK 11.
This commit is contained in:
Yan Zhulanow
2022-03-03 17:11:13 +09:00
parent 6b00b51e6d
commit 736c6c4d29
3 changed files with 16 additions and 1 deletions
+4 -1
View File
@@ -130,7 +130,10 @@ private fun renderModule(project: PProject, module: PModule) = PFile(
}
}
xml("orderEntry", "type" to "inheritedJdk")
when (val javaLanguageVersion = module.javaLanguageVersion) {
null -> xml("orderEntry", "type" to "inheritedJdk")
else -> xml("orderEntry", "type" to "jdk", "jdkName" to javaLanguageVersion.toString(), "jdkType" to "JavaSDK")
}
xml("orderEntry", "type" to "sourceFolder", "forTests" to "false")