-
Notifications
You must be signed in to change notification settings - Fork 270
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
Compiled plugins not used correctly #145
Comments
FWIW when I was using v0.1.9 I didn't notice any problems like that, so the issues was likely introduced somewhere in between. |
I think I've figured out what's wrong here. I just had the same issue again and had a look inside the sandbox folder. In the
I'm using https://github.com/Zoltu/Gradle.Plugin.Versioning to set the plugin version automatically based on the Git tags in my repository, which means that each time I commit something the version string changes and a new JAR file is created. It seems that as long as the JAR file name stays the same the problem doesn't exist, but as soon as I commit and a new file is generated, IntelliJ will use the old JAR file instead of the new code. I can work around this issue by deleting the old JAR file from the folder mentioned above, but maybe the Gradle plugin should instead remove and recreate the |
IntelliJ doesn't make choice between jars. Gradle plugin also doesn't make it – the plugin uses the output file of builtin I don't see a thing to fix in gradle-intellij-plugin. I'd say it's either Gradle's bug or versioning-plugin messes up the result of built-in gradle's tasks. |
as you can see in https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archiveName adding the plugin version to the JAR filename is the default behavior of Gradle |
I know and gradle-plugin doesn't care how the file is named. So the answer is the same: I don't see any thing to fix in gradle intellij plugin. If you see one – explanation or contribution are welcome. Until then: won't fix. |
I don't quite understand how you don't see this as a bug... 🤔
How does IntelliJ figure out what JARs to load? Does it just load all JAR files in the As I mentioned above: I think the right solution is removing old JAR files produced by the plugin, but since we can't know what the old JAR files are called we will likely just have to remove the |
I missed the part that all these jars are located in the sandbox. Will take a look |
depends on #17 |
sorry, should've made that clearer. thanks for looking into this! |
in case others are hitting the same issue, here is my current workaround: task cleanSandboxPlugins(type: Delete) {
delete '.sandbox/plugins'
}
prepareSandbox.dependsOn cleanSandboxPlugins This assumes that you've set |
Awesome, thanks! |
I'm currently using 2749c1c of this Gradle plugin, and when I run the
runIdea
task sometimes the recompiled plugin doesn't seem to be used by the started IntelliJ instance. For example when I useprintln()
in my code and run it, it prints the stuff properly to the console, but then when I remove theprintln()
calls and runrunIdea
again sometimes the console output is visible again. Unfortunately I haven't been able to reliably reproduce this, but removing the sandbox and runningrunIdea
again seems to at least solve the issue.The text was updated successfully, but these errors were encountered: