How to temporarily modify compile scope?

our development model and build system makes strict distinction between compile and runtime dependencies.

we generate idea configuration with compile dependencies only (APIs) and our plugin enriches run/debug classpath with runtime dependencies... the goal is to keep developer's workspace clean by making IDEA unaware of runtime-only classes.

however, "Make module" feature is not working for us and we are unable to fix it.
the actual problem can be explained on this scenario:

let's have 3 modules:
- API
- Impl - depends on API
- Launcher -depends on API (compile dep.) and Impl (runtime only dep.)

Now if we "make module" Launcher, only Launcher and API modules are compiled since runtime dependency on Impl module is not known to IDEA.

So, repeating the question from the subject:
Is it possible to temporarily modify compile scope of the IDEA?
If so, how?

Thank you

2 comments
Comment actions Permalink

I can't tell you if what you want to do is possible (my gut feeling is no), but a
workaround I can think of is to programmatically trigger another Make-process for your
runtime-dep modules after IDEA has processed the dependencies it knows about.

Sascha

0
Comment actions Permalink

any idea how to hook into the "make module" process and when it is possible to invoke "make runtime modules" action?

(seems like we did not find the way yet in the great extensive JetBrains documentation :-| )

0

Please sign in to leave a comment.