Started migrating a large plugin from 1.x to 2.x. Some issues out of the gate:
the project uses Groovy, but it appears not to be supported in 2.x??
2.x requires gradle 8.5+, but refreshing the gradle build fails to pickup the wrapper, which is generated in ./.gradle, in my case I’m using a 8.12.1 wrapper.
I tried loading 2025.1 EAP and generating a new Plugin project to use the build.gradle.kts as a fresh start, but it generates for 1.x using 1.17.4, apparently you can’t generate a workable new plugin in EAP yet?
my plugin is separated into two modules: primary part, and JPS part, will this work with 2.x, esp. considering JPS module must target jdk 8?
Anyhow, right now I’m still stuck on #2 just getting the build.gradle.kts file to use an updated gradle version. Any suggestions here would be appreciated.
Additionally, are there any existing migration tools for moving from a groovy gradle build to kotlin one?
I had to manually change ./gradle/wrapper/gradle-wrapper.properties file to make this work
Made progress, but after following 2.x instructions, I can’t get past the error:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
[org.jetbrains.intellij.platform] Configuration 'configuration ':intellijPlatformDependency'' has some resolution errors. LocalIvyArtifactPathComponentMetadataRule will not be registered.
[org.jetbrains.intellij.platform] Configuration 'configuration ':jps-plugin:intellijPlatformDependency'' has some resolution errors. LocalIvyArtifactPathComponentMetadataRule will not be registered.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
No IntelliJ Platform dependency found.
Please ensure there is a single IntelliJ Platform dependency defined in your project and that the necessary repositories, where it can be located, are added.
See: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
BUILD FAILED in 8s
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all dependencies for configuration ':compileClasspath'.
at org.gradle.api.internal.artifacts.ResolveExceptionContextualizer.mapFailure(ResolveExceptionContextualizer.java:81)
at org.gradle.api.internal.artifacts.ResolveExceptionContextualizer.contextualize(ResolveExceptionContextualizer.java:64)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:79)
...
Caused by: org.gradle.api.GradleException: No IntelliJ Platform dependency found.
Please ensure there is a single IntelliJ Platform dependency defined in your project and that the necessary repositories, where it can be located, are added.
See: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
at org.jetbrains.intellij.platform.gradle.utils.UtilsKt.platformPath(utils.kt:76)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$platformPath$2.invoke(IntelliJPlatformDependenciesHelper.kt:147)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$platformPath$2.invoke(IntelliJPlatformDependenciesHelper.kt:146)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper.getPlatformPath$IntelliJPlatformGradlePlugin(IntelliJPlatformDependenciesHelper.kt:146)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$ide$2$1.invoke(IntelliJPlatformDependenciesHelper.kt:160)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$ide$2$1.invoke(IntelliJPlatformDependenciesHelper.kt:158)
at com.jetbrains.plugin.structure.ide.IdeManagersKt.createIde(IdeManagers.kt:18)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$ide$2.invoke(IntelliJPlatformDependenciesHelper.kt:158)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$ide$2.invoke(IntelliJPlatformDependenciesHelper.kt:157)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper.getIde$IntelliJPlatformGradlePlugin(IntelliJPlatformDependenciesHelper.kt:157)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper.createIntelliJPlatformBundledPlugin(IntelliJPlatformDependenciesHelper.kt:744)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper.access$createIntelliJPlatformBundledPlugin(IntelliJPlatformDependenciesHelper.kt:60)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$addIntelliJPlatformBundledPluginDependencies$$inlined$cachedListProvider$IntelliJPlatformGradlePlugin$1.call(IntelliJPlatformDependenciesHelper.kt:137)
at org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesHelper$addIntelliJPlatformBundledPluginDependencies$$inlined$cachedListProvider$IntelliJPlatformGradlePlugin$1.call(IntelliJPlatformDependenciesHelper.kt:123)
at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:72)
I have intellijPlatform defined in repositories, dependencies, and at the root in both the root module and submodule as instructed. My build files are available if you can diagnose the issue, would help a lot. Thanks again.