I have a dependency that i need only during the unit test runtime. How can i declare that using gradle configuration?
you mentioned both unit test compilation and test runtime, so depending on exactly which…
dependencies {
// available during compilation of tests as well as when they run...
testCompile 'your:dependency:#.#.#'
// available only while tests are running, not compilation...
testRuntime 'your:dependency:#.#.#'
}
More about dependency configurations