The Bitrise Advanced CI team shares their experience in managing unstable APIs and deprecated code in rapidly evolving build systems like Gradle. They describe a challenge encountered with the buildFinished event, which has two notification methods: BuildEventListener.buildFinished, deprecated in Gradle 8+, and the still-incubating FlowProviders.buildWorkResult. To address compatibility across Gradle versions, the team developed a plugin that considers the Gradle version to apply the appropriate method using Kotlin DSL. They illustrate how the Java compiler can manage incompatible code without preprocessor directives and detail the creation of plugins using both the old BuildListener approach and the modern FlowAction tied to FlowProviders.buildWorkResult. The team's solution ensures smooth operation on Gradle 7 projects while avoiding configuration-cache errors in newer versions, ultimately enhancing the build process's flexibility and reliability.