How do I tweak Idea dependencies?

I need to re-order my module’s dependencies in Idea, putting the library dependencies above the project dependencies. Failing that, I need to be able to mark certain dependencies as “do not export.” I’ve been able to do this in the past by tweaking the XML generated by the idea task, but we’re trying to move to Idea’s tooling-based import and I can’t figure out how to make it happen.