Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support 2024.2 #132

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Update to support 2024.2 #132

merged 2 commits into from
Sep 12, 2024

Conversation

Digity101
Copy link
Contributor

Plugins for JetBrains IDE version 2024.2+ needs JVM 21 and a migration of the Gradle IntelliJ Plugin (1.x) to IntelliJ Platform Gradle Plugin 2.0

For the migration to IntelliJ Platform Gradle Plugin, the build.gradle.kts file is replaced by a newer version from the template
Furthermore, to support JVM 21, Gradle is also updated to the latest version (8.10).

It should require more thorough testing on all features, but building the plugin and loading in the zip works on IntelliJ 2024.2. Furthermore, it can load a problem through competitive companion, create a test case and execute the test case with alt+x.(Running with AutoCP from context menu is greyed out though)

- Replaced build.gradle.kts to new template from https://github.com/JetBrains/intellij-platform-plugin-template/blob/main/build.gradle.kts due to migration of org.jetbrains.intellij to org.jetbrains.intellij.platform
- updated gradle to 8.10
- updated jvm to 21
@Pushpavel Pushpavel self-requested a review September 12, 2024 03:43
@Pushpavel
Copy link
Owner

Pushpavel commented Sep 12, 2024

@Digity101 Can u merge the changes from the main branch to this, I had updated the workflow file.

@Pushpavel Pushpavel merged commit 09ef0eb into Pushpavel:main Sep 12, 2024
6 checks passed
@Pushpavel
Copy link
Owner

@Digity101 This issue came up when publishing the plugin. Not sure why plugin verifier didn't catch such kind of issues.

> Task :verifyPluginProjectConfiguration
[org.jetbrains.intellij.platform] The following plugin configuration issues were found:
- The Kotlin Coroutines library must not be added explicitly to the project as it is already provided with the IntelliJ Platform, see: https://jb.gg/intellij-platform-kotlin-coroutines

@Digity101
Copy link
Contributor Author

Idk how to address the :verifyPluginProjectConfiguration issue. In build.gradle.kts, there is implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.0") needed for the Dispatchers.Swing for mainScope in coroutines.kt (com/github/pushpavel/autocp/common/helpers/coroutines.kt).

Removing the implementation gives a compile error, and changing the implementation to compileOnly gives a runtime error (java.lang.ClassNotFoundException: kotlinx.coroutines.swing.SwingDispatcherKt).

Changing the Dispatchers.Swing to Dispatcher.Main gives an initialization error at runtime when opening the testcase window. Changing it to Dispatcher.EDT gives a java.lang.LinkageError

I am inexperienced with IntelliJ plugin development, Gradle, and Kotlin coroutines so I might have missed some obvious solution

@Pushpavel
Copy link
Owner

Hi @Digity101, Actually this might not have been the actual issue for release failure, Its

Execution failed for task ':publishPlugin'.
> Failed to upload plugin: Upload failed: Cannot find plugin. Note that you need to upload the plugin to the repository at least once manually (to specify options like the license, repository URL etc.). Follow the instructions: https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html

I will try uploading the plugin manually for now for v0.7.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants