CustomCommandActions customActions) {
ContextAwareGradleTargetVerifier contextAwareVerifier
= customActions.getContextAwareGradleTargetVerifier();
final GradleTargetVerifier verifier1 = contextAwareVerifier != null
? contextAwareVerifier.startCommand(project, actionContext)
: null;
final GradleTargetVerifier verifier2 = customActions.getGradleTargetVerifier();
if (verifier1 == null) return verifier2;
if (verifier2 == null) return verifier1;
return new GradleTargetVerifier() {
@Override
public boolean checkTaskExecutable(
GradleTarget gradleTarget,
OutputWriter output,
OutputWriter errOutput) {
return verifier1.checkTaskExecutable(gradleTarget, output, errOutput)
&& verifier2.checkTaskExecutable(gradleTarget, output, errOutput);
}
};
}