My personal preference is to override gradle's default "buildDir" from "build" and use "out" instead. Now for the longest time, I just used the expression
buildDir = "$projectDir/out"
but using buildDir is deprecated. I actually didn't find a recommended way to accomplish this same result, though I have seen evidence that this deprecation might disappear in a post-gradle-8.0 world. I'm using gradle 8.3, and I was still getting the deprecation indication in my build.gradle.