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

runIde purges /build/idea-sandbox/plugins #188

Closed
Trolldemorted opened this issue Mar 21, 2017 · 11 comments
Closed

runIde purges /build/idea-sandbox/plugins #188

Trolldemorted opened this issue Mar 21, 2017 · 11 comments
Labels

Comments

@Trolldemorted
Copy link

I am very sorry, but i have to bother you again. After upgrading to 0.25.0 gradle purges every installed plugin from /build/idea-sandbox/plugins during prepareSandbox, and not just the one i am currently developing.

Since my plugin depends on another plugin, i have to reinstall the other plugin everytime i build. Is there any way around that?

@DenWav
Copy link
Contributor

DenWav commented Mar 22, 2017

I can confirm this is very annoying.

@zolotov
Copy link
Member

zolotov commented Mar 22, 2017

It's intended. prepareSandbox is a Sync task and this is what it should do. You free to customize prepareSandbox task in any way you want: copy additional files, install any other plugins, etc. Also you can add any plugin-dependency and prepareSandbox will copy it to the sandbox.

@zolotov zolotov closed this as completed Mar 22, 2017
@zolotov zolotov assigned zolotov and unassigned zolotov Mar 22, 2017
@Trolldemorted
Copy link
Author

Could you elaborate how i can install a third-party intellij plugin from gradle?

I have read through #14 and #17, but all examples there explain how to deploy a subproject. My plugin depends on intellij-rust, and i'd like to not to clone that repo into my project and build it myself for obvious reasons.

Unfortunately, the intellij { plugins = ["org.rust.lang"] } syntax does not allow me to use non-builtin plugins like intellij-rust.

@zolotov
Copy link
Member

zolotov commented Mar 22, 2017

Sure. Copy third-party plugin to sandbox directory during prepareSandbox tasks. E.g. like in the issue you linked (#17 (comment)).

@Trolldemorted
Copy link
Author

That would require the plugin to be bundled with gradle (intellij-rust is, luckily) and me to clone, build, and keep it up-to-date myself, wouldn't it? Even if that is theoretically possible right now, what would i do if a plugin is closed source, or has no build instructions/is not built with gradle?

Before i upgraded to 0.25.0 i was able to install and update plugins from the spawned intellij instance's settings window, which was really convenient. Is there a way to define exceptions for prepareSandbox' purging behaviour?

@zolotov
Copy link
Member

zolotov commented Mar 22, 2017

That would require the plugin to be bundled with gradle (intellij-rust is, luckily) and me to clone, build, and keep it up-to-date myself, wouldn't it?

Of course, it's not, you just need to copy compiled file like it's done in the comment I mentioned.

what would i do if a plugin is closed source

It doesn't change anything, you just need to copy jar file or unpack zip to sandbox directory.

Before i upgraded to 0.25.0 i was able to install and update plugins from the spawned intellij instance's settings window, which was really convenient. Is there a way to define exceptions for prepareSandbox' purging behaviour?

No, as I said, it's a Sync gradle task, it's intended to keep sandbox in sync with your build configuration(build.gradle). If you want to have different sandbox directory – make corresponding changes to prepareSanbox task.

@Trolldemorted
Copy link
Author

i have solved it like this.

prepareSandbox {
    copy {
        from System.getProperty("user.home")+'/.IdeaIC2017.1/config/plugins/'
        into './build/idea-sandbox/plugins/'
    }
}

but it obviously works only for the 2017.1 community edition. Is there a better way to get the path to the current Intellij's /config/plugin folder?

@zolotov
Copy link
Member

zolotov commented Mar 23, 2017

Retrieving the path to config directory of any IDE is out of scope this plugin. There is no such thing as current IDE for Gradle and for gradle-intellij-plugin. They are not related to any IDE, CI tool or anything else.

@lukbukkit
Copy link

It would be nice if there was a setting to disable this behavior, to test whether a plugin saves its settings correctly and could read these again.

@zolotov
Copy link
Member

zolotov commented Jan 22, 2019

@lukbukkit file a separate bug report, please, likely your problem has nothing to do with this issue as the settings ARE NOT stored in /build/idea-sandbox/plugins directory

@lukbukkit
Copy link

I've created a new issue and described my problem in detail: #359

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

No branches or pull requests

4 participants