Giter Club home page Giter Club logo

Comments (6)

ptrckdev avatar ptrckdev commented on August 29, 2024 3

Same Issue aswell in settings.gradle.kts as in build.gradle.kts for a gradle init project with Kotlin and Kotlin DSL without any changes made.

image

Could developing in WSL be part of the problem? The Extension is installed inside WSL

image

from vscode-kotlin.

megabyte6 avatar megabyte6 commented on August 29, 2024 1

@ptrckdev No, it's not just WSL. I have the same issue. I'm on Fedora 38 but Linux shouldn't be the issue. I think it's just that the plugin isn't designed to work with Kotlin DSL files. I was really hoping it would work but at the moment, that doesn't seem possible. In my opinion, Kotlin DSL support is even more useful than Kotlin project support since Gradle now prefers Kotlin DSL over Groovy DSL. For the time being, I think I'll just use IntelliJ IDEA for my Java/Kotlin work and use VSCode for the other stuff.

from vscode-kotlin.

fwcd avatar fwcd commented on August 29, 2024

Please try adding the option "kotlin.compiler.jvm.target": "1.8" to your VSCode settings.

from vscode-kotlin.

jul1u5 avatar jul1u5 commented on August 29, 2024

Thanks for the response. I added the option and restarted the language server.
JVM errors have disappeared, but the extension still seems to not understand some of the Gradle functions:

image

NOTE: The code has changed a little bit since I posted it here

from vscode-kotlin.

cmitchell avatar cmitchell commented on August 29, 2024

Same issue here. Didn't run into it until I enabled this extension, and changing Kotlin › Compiler › Jvm: Target from "default" to 1.8 for both User and Workspace as mentioned above still gives red error lines in the gradle.build.kts file.

from vscode-kotlin.

Baneeishaque avatar Baneeishaque commented on August 29, 2024

Same issue...

from vscode-kotlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.