There are two aspects here:
-
Practical: "How to get through the first two Gradle phases initialization and configuration, but skipping execution, at minimal costs.
Minimal costs mean
a) performance (time)
b) output clarity (not wasting console output with task listing etc.) -
Theoretical: Curiosity - how IDE (IntelliJ in that case) uses Gradle API. Do they use some backdoor features, enhance the API …?
I know that the way IDE uses Gradle can be configured in IDE settings (for build, run, tests), version of JVM is configurable and wrappers usage as well… but even having the same settings in IDE I can still see behavior differences of some Gradle plugins comparing IDE run vs build script run from command line.
Thanks for recommending “dry run” for the point 1.
However, according to documentation the “dry run” resolves task dependencies ( at least some of them which can be resolved statically, not in runtime) … anyway, in many cases I do not even need that task resolution, but only basic objects configuration - project, source sets, plugins.