Deprecation of build-file for specifying a custom build file location in 8.0

Specifying custom build file location has been deprecated. This is scheduled to be removed in Gradle 8.0. Consult the upgrading guide for further information: Upgrading your build from Gradle 7.x to the latest

There doesn’t seem to be a valid alternative. We have large numbers (hundreds) of gradle integration testing scripts that are run using -b or --build-file.

1 Like

Am also interested with a similar use case. We have hundreds of build files for building on Linux vs hundreds of build files for building on Windows that we’d rather not conglomerate and butcher up to add property checks into since the confiugrations and plugins are quite different.

This deprecation doesn’t prevent you from being able to use two different build files for Linux vs. Windows in a build. It does remove a way to do it that is discouraged because it shifts the responsibility of how the build executes (not just configuration properties) to outside of the build. You can instead write a few shared lines of code that encapsulates the possible options, is easily testable, and could also be enhanced to just use the right build file for the OS you’re on rather than having to pass it.

1 Like

Thanks James! Appreciate you clearing up my misunderstanding.