Possible to cache IntelliJ build results?

已回答

Hello!

We are currently using IntelliJ IDEA for a large Java project and have been experiencing an issue with build times when switching between branches. Our project's single build from scratch typically takes around 30 minutes. The problem arises when we switch from one branch to another that diverges significantly. Each re-build overwrites the previous build files located in the "out" folder.

This situation is causing inconvenience because whenever we need to return to a previous branch, the project has to rebuild from scratch, resulting in another 30-minute wait. We were wondering if there is a way to cache the build outputs somehow, allowing us to avoid these time-consuming rebuilds.

Any insights or suggestions on how to tackle this issue would be greatly appreciated!

0

Additionally, how does IntelliJ's incremental build works? Does it just check file modification times, or uses generated hash of input sources, or something more complex? I am wondering if manually caching and restoring build output results for each branch will work?

0

Hello, Gaurav!

Using git-worktree may help with the situation you have described.

Please also check IDEA-226938, which describes a similar case.

Upvote the Issue and leave a comment describing the specifics of your configuration to raise the priority for the developers.

0

请先登录再写评论。