Configurations allow you to use dependencies on the scope. Given this configuration hierarchy:
testRuntime -> testCompile -> runtime -> compile
Each configuration helps you limit your dependencies. * Runtime configurations allow you to include a dependency, but not have it as a compilation dependency. This is useful if you want to keep the framework loosely related to the project. Runtime dependency means you need the application to run, but you do not need to compile it.
The same applies to test * configurations.
Ref:
source share