Can I save Eclipse files from gradle tasks?

I have a gradle plugin installed in Eclipse. We have a task that creates a war for us, is there a way to save Eclipse Save All in a menu item to save all java files opened before the task starts creating a war?

Eclipse menu option Ctrl + Shift + S that I want to run in a task.

+8
java eclipse gradle
source share
2 answers

Perhaps for the Save All plugins; see How can I call the save method in the Eclipse plugin ....

But if your plugin is not yet programmed for this and does not reveal the behavior in the setup somewhere that you can install, you need to edit its source and recompile to add this functionality yourself.

0
source share

Is it possible to create a β€œRun” configuration to perform the β€œaction” of the plugins (gradle task execution)?

If so, I am sure that you can configure the launch configuration to save the files or even ask to save the modified files depending on the user's settings. before the real thing starts.

And since it is possible to save the launch configuration inside the file, you can also share it using the version control system, if you want it to work without failures for more people, then you are;).

Hope this helps or seeks.

0
source share

All Articles