in plugins/src/main/java/com/google/gradle/tasks/WarnVersionBumpTask.kt [44:54]
fun add() {
val diff = LinesChanged.fromFile(changesFile.asFile.get())
if (diff.bump == MAJOR || diff.bump == MINOR) {
if (export.isPresent) {
throw TaskExecutionException(this, Exception("Based on exported API, changes are ${diff.bump}, higher than PATCH. If this is intended, add a changelog entry. Otherwise, revert the changes."))
} else {
throw TaskExecutionException(this, Exception("Based on last release API, changes are ${diff.bump}, higher than PATCH. If this is intended, add a changelog entry. Otherwise, revert the changes. To compare local changes, run exportApi on a commit first."))
}
}
}