Skip to main content

Binary compatibility validation suggestion

The watchdog checks the shape of new API declarations. It doesn't find a change that breaks the API that a library has already published. Binary compatibility validation finds such a change, because it compares each build with a committed dump of the published API.

What happens​

The Gradle plugin, not the compiler plugin, does this check. After Gradle evaluates the project, the plugin logs a warning when neither of these is on:

The warning holds a setup snippet for the Kotlin version of the project:

import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation
kotlin {
@OptIn(ExperimentalAbiValidation::class)
abiValidation()
}

On Kotlin 2.2 and 2.3, the snippet has abiValidation { enabled.set(true) } instead of the abiValidation() call.

Disable it​

Set suggestAbiValidation in the apiWatchdog extension. Default is true.

apiWatchdog {
suggestAbiValidation = false
}