Cannot install this plugin on latest clion
I'm unable to install this plugin on latest clion: https://youtrack.jetbrains.com/issue/CPP-26061
This issue appears only for org4idea plugin.
got the same, in logs i've found
2021-08-07 10:56:44,772 [ 32697] INFO - lij.ide.plugins.DynamicPlugins - Plugin Org4Idea is not unload-safe because of extension to non-dynamic EP com.intellij.fileTypeFactory
Same in latest PyCharm 2021.2.3 CE. With same error in logs. Any workaround?
you can try this #11 . Run ./gradlew buildPlugin in env JAVA_HOME to java11 version.
Or, you can use https://github.com/huhuang03/org4idea/releases/tag/for_java11 the release I build on my pc.
and install plugin as a zip.
@huhuang03 hi, thanks for your work, installed from https://github.com/huhuang03/org4idea/releases/tag/for_java11
But have several issues during build from sources:
-
It needs
chmod +x gradlew(this need commit for convenient use) -
After, chmod, If I do
./gradlew:$ ./gradlew Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMainSeems
gradlewwrapper not properly configured. You need addorg4idea/gradle/wrapper/gradle-wrapper.jarto repository.gradlewuses this jar ifgradlenot installed in system. -
But even I use installed correct version
gradleandjavain system I cannot build plugin. I got:$ gradle buildPlugin To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon. Daemon will be stopped at the end of the build FAILURE: Build failed with an exception. * Where: Build file './org4idea/build.gradle' line: 8 * What went wrong: Plugin [id: 'org.jetbrains.intellij', version: '1.2.0'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.intellij:org.jetbrains.intellij.gradle.plugin:1.2.0') Searched in the following repositories: Gradle Central Plugin Repository * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 4sWhen I added
gradle/wrapper/gradle-wrapper.jarfile the build start successfully -
Another issue, plugin cannot build without
jetbrains_tokenproperty. It would be good to replace:token = 'jetbrains_token' ?: ""(build.gradle:27) totoken = project.findProperty('jetbrains_token') ?: ""for ability build plugin without set any extra variables.
In finally I was able to build the plugin by himself successfully. Hope this help improve you PR. I will help to test changes if you provide some fixes.
Anyway thanks for help, I've installed plugin from zip archive. Seem works as expected.
I'm also looking at the PR, the above should indeed work but I'm looking at a different angle: rather than manually adding the wrapper JAR I'd leave the task to gradle itself. Here's what works:
- set an environment variable to
ORG_GRADLE_PROJECT_jetbrains_tokento anything, empty string should suffice - run
gradle wrapperto both update the wrapper as well as downloading the required supporting files
After doing that, ./gradlew buildPlugin should build successfully
Yes, it works as you described, but in any case, ./gradlew script especially intended to run gradle-wrapper.jar downloader for gradle on machines where gradle not installed at all. So strictly speaking ./gradlew in repo without gradle-wrapper.jar does not make sense at all (as it describe in tutorial).
Last argument is it's great to have a repeatable build on any machine regardless of the environment. I would also add JVM version check as I got an unobvious error when trying to build a project on JVM 8.
The decision is always yours. But it's always great when a project is being built by one command. With no additional steps required. I'm NOT writing for criticism - just want to improve the build process a little.
it's all appreciated, thanks. I'm a bit far away from gradle / java these days so it's all very welcome input
@mrkeuz . Thanks for your guide, I have update the PR.
But the java toolchain seems not work
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
Still get the error:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
@huhuang03 great, thanks for changes! I also finally way to check java version. I've sent changes to you java11 branch (#1)
UPD: Nope, hurried, not working yet. Will try to fix.
@huhuang03 found the trick for check java version (see #2)
@mrkeuz Thank you. I have merged.