jthurne opened a new pull request #10490: URL: https://github.com/apache/kafka/pull/10490
Applies various build optimizations to take full advantage of Gradle's incremental build feature, and Gradle's local build caching feature. The optimizations will help to reduce build times for developers when running builds locally. Specific optimizations: - **Enable the local build cache** The local build cache avoids re-running tasks whose inputs have not changed, even if the build output has been cleaned or if the build is executed in a different directory. - **Instruct Gradle to ignore version files when doing up-to-date checks** This can save a lot of developer time when working locally and creating a lot of commits. In particular, tests won't be re-executed simply because the commit ID changes (unless one of the other test inputs changes). - **Update createVersionFile tasks support incremental builds and build caching** The version files are no longer recreated unless one of their inputs changes (the commit ID or the version property). The tasks are also marked as cacheable (the cached version can be used even on a `clean` build if the inputs are the same). These tasks don't take a lot of time to run, but optimizing them shows how other tasks could be optimized if needed. - **Set the root project name in settings.gradle** The root project name is used to name the build as a whole. It is used in reports and other types of artifacts. If a root project name is not set, then the containing directory's name is used as the root project name. It is a best-practice to explicitly set the root project name. Otherwise, the root project name could change if the directory the project belongs to is different from the desired name (for example, of someone checks out the repository into a directory named differently from the default). ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org