MINOR: Ensure compile and runtime classpaths have consistent versions (#9921)
MINOR: Ensure compile and runtime classpaths have consistent versions (#9921)

Ensure that runtime-only dependencies don't cause a different version to be used.
More specifically:

> The relationship is directed, which means that if the runtimeClasspath configuration
has to be resolved, Gradle will first resolve the compileClasspath and then "inject" the
result of resolution as strict constraints into the runtimeClasspath.

For more details, see:
https://docs.gradle.org/6.8/userguide/resolution_strategy_tuning.html#sec:configuration_consistency

Reviewers: Chia-Ping Tsai <51ef25fd0a3611d18ffb478ae2ae610bbbd2432c@gmail.com>
apache/kafka,guozhangwang/kafka,lindong28/kafka,Chasego/kafka,Chasego/kafka,Chasego/kafka,lindong28/kafka,guozhangwang/kafka,guozhangwang/kafka,TiVo/kafka,TiVo/kafka,apache/kafka,apache/kafka,Chasego/kafka,TiVo/kafka,lindong28/kafka,guozhangwang/kafka,lindong28/kafka,apache/kafka,TiVo/kafka