p

    Peter Vegh

    1 year ago
    Is there a way to user kotlinx serialization in a foo.main.kts?
    m

    Michael

    1 year ago
    THeoretically but not the compiler plugin so @Serializable won't work
    p

    Peter Vegh

    1 year ago
    What's the closest solution I could use?
    m

    Michael

    1 year ago
    You can implement all serializers by yourself or use something like jackson
    p

    Peter Vegh

    1 year ago
    Ok. Is there an issue/KEEP about this I missed on my way?
    m

    Michael

    1 year ago
    not to my knowledge
    Also don't think this will change, as only gradle is supported
    p

    Peter Vegh

    1 year ago
    Thanks for the input
    Dominaezzz

    Dominaezzz

    1 year ago
    Fwiw, there's a ticket for doing this outside gradle.
    p

    Peter Vegh

    1 year ago
    Do you have the url at hand?
    Dominaezzz

    Dominaezzz

    1 year ago
    b

    Ben Woodworth

    1 year ago
    If using a shebang is an option (and running with
    ./foo.main.kts
    in a terminal), this has worked nicely for me:
    #!/usr/bin/env -S kotlinc -jvm-target 1.8 -script -Xplugin="${KOTLIN_HOME}/lib/kotlinx-serialization-compiler-plugin.jar" --