How can I build only the current module and not all dependent modules?


(Youri Bonnaffé) #1

With gradle and a multiple module builds, let’s say we have: - root

  • module-api

  • module-impl If I’m in module-impl folder and run gradle build, it will first build module-api then module-impl. This is the expected behavior. Is it possible to build only the module-impl without rebuilding module-api (well in many case it will not actually be rebuilt but it is still taking time to realize that). It can be useful when you have a lot of modules and are sure that other modules have not changed. Thanks,


(Peter Niederwieser) #2

The only built-in way to suppress both the up-to-date check and the execution of a dependent task (in an ad-hoc fashion) is ‘-x someTask’. But it’s probably not a good fit in your case.