Skip gradle configuration phase on submodules

1k views Asked by At

Lets suppose I have a gradle project:

/
submodule/
    build.gradle
anothermodule/
    build.gradle
build.gradle

If I enter gradle build it just builds all projects as expected.

But when I enter gradle :submodule:build besides building the submodule it also passes the configuration phase of anothermodule. When something goes wrong in the configuration of the other module, it aborts building submodule.

The only way I know to prevent from that, is to temporarily remove anothermodule from the settings.gradle, call build on submodule and reinsert it. I'm wondering if there is an easier way to omit the configuration phase of non related modules, or at least ignore errors in the config phase of anothermodule and proceed with what I told gradle to do (which is building submodule)?

0

There are 0 answers