Reputation: 637
How do I mark packages as excluded (i.e. so IntelliJ doesn't refuse to run or build the project if one of them is broken) whilst still pushing them via git? How does one separate the functionalities of exclusion from git and exclusion from runtime?
Context:
I am basically using IntelliJ to hold emptyworksheet/worksheet/solutions packages in the same project as it doesn't allow multiple projects open at once. It is not intended to be elegant or workable - just to emulate the environment I write Java in whilst keeping the 'solutions' and 'empty worksheets' handy for repeat attempts.
Upvotes: 1
Views: 86
Reputation: 180
I'd suggest using modules. You can unload the modules you do not need from the project, so that the IDE does not compile them (see https://www.jetbrains.com/help/idea/temporarily-ignoring-unused-modules.html for details).
Starting from the last 2017.3 EAP build (https://www.jetbrains.com/idea/nextversion/), IDEA will also check if changes you are about to commit are going to break compilation for unloaded modules, and will warn you about that: https://blog.jetbrains.com/idea/2017/10/intellij-idea-2017-3-eap-brings-improvements-for-unloaded-modules/.
Upvotes: 1