Tests not executed in composite build (includeBuild)

Hi,

I have a project similar to the composite build example. One of the projects that are included using includeBuild (lets say string-utils) has junit tests.

Unfortunately it looks like gradle is building the libraries, but skipping the tests when I run the app (e.g. :app:run. Is this expected? Can this be changed?

Yes, this is expected.
A dependency just says “I need the jar”, and Gradle as always avoids work where it can, so only the jar is built.
If you want the tests to be executed, you have to model this yourself, for example with :string-utils:jar depending on :string-utils:check or with :app:check depending on :string-utils:check or something similar.

Ok, thanks, then I understood that now and will adjust my expectation and add try to add these task depenedencies manually. :+1:

1 Like