Build IntelliJ Project from the Command Line

Answered

Hi,

I work on a large Gradle-based Java project. Choosing to Build and Compile with IntelliJ instead of Gradle seems to give us much better performance on incremental builds (i.e. very low compilation/build times when changing a few files and then re-running a test). What I'd like to do is to trigger a full IntelliJ project build (i.e. Menu->Build->Rebuild Project) from the command line so that I can have a built and ready-to-go project right when I open the IDE, instead of having to open and trigger the build in the IDE since just using `gradlew` from the command line doesn't affect the IntelliJ project files. Is there a way to do this that I'm missing (ideally something easy like `idea build .`? If not, how difficult would it be to add as a new feature?

1
1 comment

Currently the only way of using the IDE own builder from the command line is to use TeamCity build server: https://stackoverflow.com/a/41979227/2000323 It would require a lot of efforts to implement this as standalone tool.

0

Please sign in to leave a comment.