Kotlin DSL for Gradle not recognizing dependencies when using Java 17
I tried several approaches but none seem to work. I'm stuck on something that should probably be simple. I'm currently working with an scenario with my Kotlin DSL build script in a Gradle project that targets Java 17. While migrating from Java 11, I updated my `build.gradle.kts` file to reflect the necessary changes but now it seems that my dependencies are not being recognized correctly, resulting in the behavior: `Could not resolve all files for configuration ':implementation'.` Here's a snippet of my `build.gradle.kts`: ```kotlin plugins { kotlin("jvm") version "1.6.10" } repositories { mavenCentral() } dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib") implementation("com.squareup.retrofit2:retrofit:2.9.0") } java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } } ``` I have tried syncing the project and even invalidated caches in IntelliJ IDEA, but the scenario continues. Additionally, I confirmed that my Gradle wrapper is at version `7.3`, which should support Java 17. However, I noticed that IntelliJ shows a yellow warning suggesting that the Kotlin plugin is for an incompatible version. I also attempted to set the Kotlin version in `gradle.properties` like this: ```properties kotlin.version=1.6.10 ``` But that didn't change anything. Is there something I'm missing in the configuration, or do I need to specify additional settings to make this work with Java 17? Any help or insights would be greatly appreciated! Am I missing something obvious? My development environment is macOS. I'd really appreciate any guidance on this. How would you solve this? Has anyone else encountered this?