question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How will kotlin 1.3 scripting affect kscript?

See original GitHub issue

Just 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
oshaicommented, Sep 26, 2018

I had the same question myself

0reactions
holgerbrandlcommented, Jan 14, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found