-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Kobalt should use separate runtime to compile Kotlin based projects #317
Comments
@cbeust I added some implementation of KotlinProjectConfigurator for Kobalt based project. You can find it in the https://github.com/cbeust/kobalt-intellij-plugin/tree/kotlin-1.1-migration So the only thing which is missing at the moment it is a "apply kotlin kotlinVersion" plugin which gives to user the ability to specify the needed Kotlin compiler for the project. To compile the plugin you should use the latest beta version of Kotlin. |
Even with
|
I wiped my repo and recloned, same problems. I can fix the Really strange since I find them in the github Any thoughts? I'd really like to try that new configurator. |
@cbeust Yeach, forgot to mention that there need to do some reconfiguration in IDEA SDK to build plugin from this branch:
|
Also org.apache.http.auth.Credentials should be located in httpclient-4.5.2.jar and it is a part of SDK IDEA_INSTALL_DIR/lib |
Ok, just tried to test existing ability of Kobalt (1.0.51) to specify Kotlin version.
When I execute the
So the version of Kotlin compiler is still 1.1.1. @cbeust Any thoughts? |
Fixed in 1.0.53. |
Great! For me it works. |
After playing with latest Kobalt version based on the latest Kotlin version (beta version at the moment) I realize that Kobalt should use Kotlin runtime configuration for compiling project different from Kotlin runtime bundled with Kobalt.
The use case can be following:
A user can have a big legacy project which is based on some outdated version of Kotlin. But he wants to migrate to the latest version of Kobalt. He cannot do it because the latest version of Kobalt probably will have the latest Kotlin compiler under the hood. So it tends to full migration of the project to the newest version and this will probably take a lot of time and definitelly not what the user want.
So the Kotlin runtime used by Kotlin to compile Build.kt file should be different from Kotlin runtime used in project.
Kotlin runtime for the project can be specified in Build.kt as following:
val kotlinVersion = "1.0.6"
apply kotlin kotlinVersion
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
}
dependenciesTest {
compile("org.jetbrains.kotlin:kotlin-test:$kotlinVersion")
}
The derictive "apply kotlin" should apply the valid version of Kotlin compiler to the project.
The text was updated successfully, but these errors were encountered: