kobalt
kobalt copied to clipboard
Ability to specify language level and SDK version in Kobalt build script
As discussed here https://github.com/cbeust/kobalt-intellij-plugin/issues/59 It would be great to have the ability to specify language level (and probably SDK version).
E.g. in Gradle it could be done like this:
allprojects {
tasks.withType(JavaCompile) {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
}
This language level can be used in Kobalt build to choose the right SDK version to compile project because e.g. it still could be some legacy projects which require 1.6 source level.
This language level/ sdk name can be used in IDEA plugin as well to determine correct language level after import/reimport from Kobalt project model.
You can already specify compiler flags:
javaCompiler {
args("-source", "1.7", "-target", "1.7")
}
Isn't this sufficient?
Yep, it is sufficient for java compiler. But maybe we need additional jdkVersion flag?
In the most cases jdkVersion=languageLevel=source compiler flag but there is some use cases in which the project uses the latest jdk but with less language level. E.g. it is some kind of temporal setup for migration of big legacy project.
So I need languageLevel and sdkVersion sended from Kobalt server to plugin to configure project during the import:
