How will kotlin 1.3 scripting affect kscript?
See original GitHub issueJust read the RC release notes and stumbled upon:
There is a new public artifact: kotlin-main-kts. It contains a script definition and a minimal maven artifacts resolver in a single jar. Its purpose is to simplify the creation and usage of the simple utility scripts that may depend on the external libraries. For example, you can now write the following script:
@file:Repository("https://jcenter.bintray.com")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.11")
import kotlinx.html.*
import kotlinx.html.stream.*
print(createHTML().html {
body {
h1 { +"Hello, World!" }
}
})
Then run it with only kotlin-main-kts.jar in the classpath:
kotlinc -cp <path/to/kotlin-main-kts.jar> -script sample.main.kts
This looks a lot like what kscript currently does … will you adopt the 1.3 scripting? Will this make kscript obsolete? Is this taking kscript to the core? What are your thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Kotlin as scripting language - Daniele Bonaldo
A Kotlin script is a simple Kotlin snippet, without the need of the main function that you would need in a typical program....
Read more >Kotlin - a language for everyone and for everything. Even scripts.
scripting. Kotlin is an open source, statically typed and powerful language. It takes inspiration from many programming languages like Java, ...
Read more >Scripting in Kotlin with kscript - Fredrick Biering
There are several reasons, but one of them is the fact that it's concise. Concise enough that writing scripts in it did not...
Read more >kscripting/kscript: Scripting enhancements for Kotlin - GitHub
Kotlin has some built-in support for scripting already, but it is not yet feature-rich enough to be a viable alternative in the shell....
Read more >Kscript, Kotlin script kscript, Kotlin script shebang, Kotlin script ...
A Kotlin script is a simple Kotlin snippet, without the need of the main function ... from 1.4-M1 to 1.4-RC (as Kotlin 1.3.7x...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same question myself
@CaelumF @moisesvs Doesn’t the problem rather point towards gradle and the ide. It doesn’t seem to be a problem with kscript itself, but I may miss the point here.