Igor Mukhin
03/13/2025, 11:09 AMorg.gradle.parallel=false
in gradle.properties
, but the project still builds in parallel.
Only after I turned off the the configuration cache, the build is sequential again.
Do you have any ideas what is going on?ephemient
03/13/2025, 12:11 PMAll tasks run in parallel by default, subject to dependency constraints.
Mikhail Lopatkin
03/13/2025, 12:12 PMorg.gradle.parallel
has no effect. In order to limit parallelism, you can use a build service with maxParallelUsages = 1
. You can then connect it to test tasks with Task.usesService()
. Its implementation can be empty.ephemient
03/13/2025, 12:13 PM--max-workers=1
but that will slow your whole build downephemient
03/13/2025, 12:13 PMephemient
03/13/2025, 12:13 PMIgor Mukhin
03/13/2025, 12:31 PMMikhail Lopatkin
03/13/2025, 12:34 PMIgor Mukhin
03/13/2025, 12:55 PMThomas Broyer
03/13/2025, 12:56 PMI don't think docker networks can help me in my case. Tests are running in Gradle on the host and containers are just the infra like Postges.No, but you probably could use different (dynamic) ports so they can run in parallel. (ideally let Docker pick a dynamic port, i.e. use
-p 5432
rather than -p 127.0.0.1:5432:5432
if using the command line, then ask docker for the port it picked, e.g. using `docker inspect`: https://docs.docker.com/reference/cli/docker/inspect/#list-all-port-bindings)Igor Mukhin
03/13/2025, 1:02 PMIgor Mukhin
03/13/2025, 2:54 PM