Vlastimil Brecka
07/02/2026, 9:35 AM./gradlew check it runs all the checks everywhere
If I run ./gradlew :app1:check it runs checks only for app1 directly
How do I have it run checks for the app1 + its subgraph of dependencies? (other than manually maintaining a whitelist of projects to run)
or is this against some gradle philosophy? bazel has thisIvan CLOVIS Canet
07/02/2026, 9:59 AM./gradlew -p app1 check
I'm not sure how intended this is though. For example, if you have a settings.gradle.kts in app1 , the behavior is not what you want.Vlastimil Brecka
07/02/2026, 10:00 AMIvan CLOVIS Canet
07/02/2026, 10:02 AM<task> : Run that task in the current project and all subprojects that have it
⢠<project>:<task> : Run that task in that project specifically, fail if it doesn't exist
By telling Gradle that app1 is the root project, it runs only for app1 and subprojectsVlastimil Brecka
07/02/2026, 10:03 AMVlastimil Brecka
07/02/2026, 10:03 AMVampire
07/02/2026, 10:03 AMI'm not sure how intended this is though. For example, if you have aIf you have a settings script ininsettings.gradle.kts, the behavior is not what you want.app1
appl and also include it (not includeBuild) in the settings script one directory higher, that is anyway a highly problematic setup that should never be done. One project must always only be part of exactly one build directly.Ivan CLOVIS Canet
07/02/2026, 10:04 AM-p is not intended to do that, so there may be some weird things I don't know that make it a bad idea.Vampire
07/02/2026, 10:04 AMVampire
07/02/2026, 10:04 AMcd app1 && ../gradlew check which should have the same effectIvan CLOVIS Canet
07/02/2026, 10:05 AM-p is intended to target a directory that contains a settings.gradle.kts
Honestly I was surprised that if you -p a directory that doesn't have a settings.gradle.kts , it uses the one from the current directory instead.Vampire
07/02/2026, 10:05 AMVlastimil Brecka
07/02/2026, 10:06 AMVampire
07/02/2026, 10:06 AMMy understanding is thatThat's not my understanding. Afair it is like I said like cd-ing into that directory and call Gradle from that directory.is intended to target a directory that contains a-psettings.gradle.kts
Vlastimil Brecka
07/02/2026, 10:07 AMcd, how does it scope down the graph?Ivan CLOVIS Canet
07/02/2026, 10:08 AMIvan CLOVIS Canet
07/02/2026, 10:08 AMcd app1
../gradlew check
will run check for app1 and all subprojects, TILVampire
07/02/2026, 10:08 AMVampire
07/02/2026, 10:09 AM-p say
,-p--project-dir
Specifies the start directory for Gradle. Defaults to current directory.
Vampire
07/02/2026, 10:09 AMVlastimil Brecka
07/02/2026, 10:09 AMVampire
07/02/2026, 10:09 AMVampire
07/02/2026, 10:10 AMcd and it is highly bad setup.Martin
07/02/2026, 10:10 AMwill runBut @Vlastimil Brecka doesn't want subprojects, they want dependenciesforcheckand all subprojects, TILapp1
Vampire
07/02/2026, 10:10 AM-p and specifying that directory.
If it does not, that would be a bugMartin
07/02/2026, 10:11 AMVampire
07/02/2026, 10:11 AM:app1 and descendent projects, not dependencies that are not descendentsVampire
07/02/2026, 10:12 AMI always thought you needed to run Gradle from a directory that contained a settings scriptIn former times settings scripts were not even mandatory, so no. š It was always like that, Gradle searches for the settings script upwards in the directory hierarchy and in former times also a bit sidewards for "includeFlat" setups.
Vlastimil Brecka
07/02/2026, 10:13 AMMartin
07/02/2026, 10:13 AMMartin
07/02/2026, 10:14 AMVlastimil Brecka
07/02/2026, 10:14 AMMartin
07/02/2026, 10:14 AMVlastimil Brecka
07/02/2026, 10:14 AMMartin
07/02/2026, 10:14 AMMartin
07/02/2026, 10:15 AMVlastimil Brecka
07/02/2026, 10:15 AMIvan CLOVIS Canet
07/02/2026, 10:15 AM./gradlew check for the entire build, the first build may take longer but everything should be cached
And if your up-to-date checks are not correct, you have worse problems (correctness problems)Vlastimil Brecka
07/02/2026, 10:15 AMVampire
07/02/2026, 10:15 AMVampire
07/02/2026, 10:16 AMVlastimil Brecka
07/02/2026, 10:16 AMVampire
07/02/2026, 10:16 AMVlastimil Brecka
07/02/2026, 10:16 AMVampire
07/02/2026, 10:16 AMMartin
07/02/2026, 10:16 AMVampire
07/02/2026, 10:17 AMVlastimil Brecka
07/02/2026, 10:17 AMVampire
07/02/2026, 10:17 AMMartin
07/02/2026, 10:17 AMMartin
07/02/2026, 10:18 AMMartin
07/02/2026, 10:18 AMVampire
07/02/2026, 10:18 AMhow is that different? isnt that corruptable the way incremental ones are?Theoretically, yes. But a cacheable task should be written properly for being properly cacheable. If that is faulty then yes, you can get bad results. But this is way less likely than the other problem.
Vampire
07/02/2026, 10:18 AMVampire
07/02/2026, 10:18 AMVampire
07/02/2026, 10:19 AMMartin
07/02/2026, 10:19 AMVlastimil Brecka
07/02/2026, 10:19 AMVampire
07/02/2026, 10:20 AMVlastimil Brecka
07/02/2026, 10:20 AMVampire
07/02/2026, 10:21 AMVlastimil Brecka
07/02/2026, 10:24 AMVampire
07/02/2026, 10:24 AMcheck task as task dependency
⢠add a dependency scope configuration that depends on the current project
⢠add a resolvable configuration that extends the dependency scope configuration and requests the variant of that consumable configuration
⢠depend on that resolvable configuration from the check task
That way I think (but did not try) you should get the behavior you want.Martin
07/02/2026, 10:25 AMbtw would the build cache be effective in my case where releases are every 2 weeks?) in inbetween theres lots of commits daily?Your daily commits would contribute the build cache
Martin
07/02/2026, 10:26 AMVlastimil Brecka
07/02/2026, 10:26 AMVlastimil Brecka
07/02/2026, 10:26 AMVlastimil Brecka
07/02/2026, 10:26 AMVampire
07/02/2026, 10:26 AM(btw would the build cache be effective in my case where releases are every 2 weeks?) in inbetween theres lots of commits daily?)Heavily depends on how you set it up, but usually yes. Because say you have 20 projects and a commit changes code of 5, then for the other 15 the build cache can be used (unless there was an API change in the 5 where some of the 15 depend on, then those need to be recompiled too of course. And on release most of the cacheable tasks should be reused from cache. Each build should benefit from the cache unless you change everything or very central things.
Martin
07/02/2026, 10:27 AMMartin
07/02/2026, 10:27 AMMartin
07/02/2026, 10:28 AMVlastimil Brecka
07/02/2026, 10:28 AMVampire
07/02/2026, 10:29 AMVampire
07/02/2026, 10:29 AMVampire
07/02/2026, 10:29 AMVlastimil Brecka
07/02/2026, 10:30 AMVampire
07/02/2026, 10:31 AMVlastimil Brecka
07/02/2026, 10:32 AMVampire
07/02/2026, 10:36 AMVlastimil Brecka
07/02/2026, 10:38 AMVlastimil Brecka
07/02/2026, 10:38 AM./gradlew build and call it a day on their cicd yaml config? šVampire
07/02/2026, 11:17 AMVlastimil Brecka
07/02/2026, 12:31 PMVampire
07/02/2026, 1:12 PMtony
07/02/2026, 4:51 PMVlastimil Brecka
07/02/2026, 4:56 PMMartin
07/02/2026, 4:57 PMtony
07/02/2026, 4:58 PMreimplement gradlegradle has some deficiencies. So, yeah. With a big enough project supporting a large enough cohort of product developers, it makes sense to do this. As I said, we had a team of four senior people (expensive!). But we also supported 500 developers on a flagship project (very very expensive!)
tony
07/02/2026, 4:59 PMVlastimil Brecka
07/02/2026, 4:59 PMtony
07/02/2026, 4:59 PMtony
07/02/2026, 5:00 PMVlastimil Brecka
07/02/2026, 5:01 PMVlastimil Brecka
07/02/2026, 5:08 PMtony
07/02/2026, 5:13 PMVlastimil Brecka
07/02/2026, 5:13 PMtony
07/02/2026, 5:15 PMVlastimil Brecka
07/02/2026, 5:16 PMtony
07/02/2026, 5:17 PMVlastimil Brecka
07/02/2026, 5:18 PMtony
07/02/2026, 5:20 PMtony
07/02/2026, 5:21 PMVlastimil Brecka
07/02/2026, 5:24 PMtony
07/02/2026, 5:26 PMVlastimil Brecka
07/02/2026, 5:30 PMVlastimil Brecka
07/02/2026, 5:43 PMtony
07/02/2026, 5:52 PM