Gradle's configuration cache improves build performance by caching the configuration phase. This post covers improvements to build configuration input tracking in Gradle 8.1–8.4, explaining what counts as a configuration input, how incorrect tracking leads to false cache hits or misses, and how to fix common plugin patterns. Two major use cases are covered: File API tracking (tracking file existence checks like File.exists) and store-time input tracking (inputs accessed while serializing the task graph). For each, temporary opt-out Gradle properties are provided, along with proper fixes using ValueSource, task-based file creation, and built-in providers like fileContents.
Table of contents
Table of ContentsIntroductionBuild configuration inputs #Temporarily ignoring build configuration inputs #Use case 1: File API tracking #Use case 2: Tracking inputs while storing the task graph #Conclusion #DiscussSort: