cbeust / kobalt-intellij-plugin

An IntelliJ plug-in for Kobalt
21 stars 7 forks source link

Syncing should preserve the compiler level #59

Closed cbeust closed 7 years ago

cbeust commented 7 years ago

Whenever I sync, the plug-in resets the compiler level to 1.6:

image

This settings should be saved before sync and restored afterward.

dmitry-zhuravlev commented 7 years ago

@cbeust During the initial import there is no way to determine which language level and SDK version should be used. 1.6 it is a default one. I can set the level explicitly to 1.8 but what about users which still have 1.7 or even 1.6?

The consequence re-import recreate the the IDEA project from scratch and there is no way to store something in between sync.

E.g. Gradle daemon send to IDEA plugin the following information: String jdkVersion, String languageLevel. Maybe Kobalt server could do the same? Kobalt server instance can determine such information (e.g. by Build.kt) and return it to IDEA plugin.

FYI some snippet from Gradle:

allprojects {
    tasks.withType(JavaCompile) {
        sourceCompatibility = '1.7'
        targetCompatibility = '1.7'
    } 
}
cbeust commented 7 years ago

Let's use 1.8 as default, then. Users using an older version will be a bit inconvenienced but they are probably a minority.

Otherwise, sure, Kobalt could send you this information, can you file an issue for Kobalt for this?

Thanks!

dmitry-zhuravlev commented 7 years ago

Users using an older version will be a bit inconvenienced but they are probably a minority.

:) Probably can agree: lets set default 1.8 to majority first. FYI created the corresponding issue https://github.com/cbeust/kobalt/issues/371