Skip to content

Instantly share code, notes, and snippets.

Last active October 11, 2022 05:17
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

How to use Silk 1.9.1

To use Silk 1.9.1 with Kotlin 1.7.0 or 1.7.10, you have to do the following steps, since Silk already requires context receivers to function.

1. Add the compiler argument to Gradle

tasks {
    withType<KotlinCompile> {
        kotlinOptions {
            jvmTarget = "17"
            freeCompilerArgs += "-Xskip-prerelease-check"

If you want to use context receivers yourself, add -Xcontext-receivers to the list here as well.

2. Add the compiler argument to IntelliJ

You have to set -Xskip-prerelease-check here as well, since the compiler of the Kotlin IntelliJ Plugin is a separate thing.

Press Ctrl + Shift + A to open the actions search and search for "kotlin compiler".


Now add -Xskip-prerelease-check to the compiler arguments here.


Remember that you have done this, to remove it at some point in the future where this is no longer necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment