Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a custom build script to IDEA?

Is there a simple way to configure a totally custom build process for a non-Java project in IntelliJ IDEA? Basically, I just need to run a custom shell command instead of any smarter build processes.

like image 977
Max Alibaev Avatar asked Jan 30 '16 10:01

Max Alibaev


People also ask

How do I create a build file in IntelliJ?

In the Project tool window, select the directory, where the build file should be created. Right-click the directory and from the context menu, select New | File ( Alt+Insert ). In the New File dialog, specify the name of the new file with the xml extension, for example, build.

How do I change the build configuration in IntelliJ?

From the main menu, select Run | Edit Configurations. Alternatively, press Alt+Shift+F10 , then 0 . In the left-hand pane of the run/debug configuration dialog, click Edit configuration templates…. In the Run/Debug Configuration Templates dialog that opens, select a configuration type.

How do I write a script in IntelliJ?

Press Ctrl+Shift+A and type IDE Scripting Console . Once the required option is located, click it to run the console. This opens the IDE Scripting Console tab in the editor, where you can type code and execute it using Ctrl+Enter .

How do I import a project into IntelliJ?

Otherwise, from the main menu, select File | New | Project from Existing Sources. In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open. Gradle or Android Gradle: select the necessary build tool and click Finish.


1 Answers

Try configuring these shell commands as custom tools (File > Settings > Tools > External Tools).

You can then assign keys for invoking them (e.g Ctrl + F9) in File > Settings > Keymap > Main menu > External Tools > [Your tool name]

like image 155
Ivaylo D. Ivanov Avatar answered Oct 21 '22 14:10

Ivaylo D. Ivanov