Custom build script is not supported
If you specified -b or --build-file already on the commandline, the completion should work with taking that into account.
Actually the code comment in __gradle-set-build-file already says that it does:
# In order of precedence: --build-file=filename, rootProject.buildFileName, build.gradle, build.gradle.kts
but only the latter three are halfway supported.
So even if this does not get fixed, at least the code comment should be fixed. But I hope for the former of course. :-)
It looks like there is some code present that is supposed to do this:
https://github.com/gradle/gradle-completion/blob/25da917cf5a88f3e58f05be3868a7b2748c8afe6/_gradle#L48-L49
We believe this issue is no longer relevant. Please file a new issue if necessary.
This command line option was removed with Gradle 9.0.0
see
- https://github.com/gradle/gradle/issues/33093