Run Commamd Before Build in IntelliJ IDEA

I came across this question at StackOverflow when I was searching the same question in Google.

I found that you don’t need a ant build script, that is just use the IntelliJ default system is just fine. For example, I am doing my project with android-ndk, so I want intelliJ run ndk-build NDK_DEBUG=1 -j4 before normal build.

Here is the solution:

  1. Run -> Editor configuration
  2. Select on of you build configuration in the left side of the dialog.
  3. On the right side there is an area marked as Before Launch
  4. Click the “plus” button, choose Run External Tool in the popup menu.
  5. Click the “plus” button in the new popup window
  6. Then you get into the real configuration window.

Let me show you some fine picture:

1. Select on of you build configuration in the left side of the dialog.

Select on of you build configuration in the left side of the dialog.

2. On the right side there is an area marked as Before Launch

On the right side there is an area marked as **Before Launch**

3. Select on of you build configuration in the left side of the dialog.

enter image description here

4. Click the “plus” button in the new popup window

Click the "plus" button in the new popup window

5. Then you get into the real configuration window.

Then you get into the real configuration window.

分享到: 更多

Comments

Copyright © 2017 - LanderlYoung - Powered by Octopress

Recent Posts

Categories

Tags

>