fix(build): require module's "optional" dependencies while running their tests
@@ -116,8 +116,12 @@ dependencies {
)
if (gestaltDep.isOptional) {
- // and/or testImplementation?
+ // `optional` module dependencies are ones it does not require for runtime
+ // (but will use opportunistically if available)
compileOnly(gradleDep) { isChanging = true }
+ // though modules also sometimes use "optional" to describe their test dependencies;
+ // they're not required for runtime, but they *are* required for tests.
+ testImplementation(gradleDep) { isChanging = true }
} else {
implementation(gradleDep) { isChanging = true }
}
