@Override public Scope getTestProvided() { return Scope.builder(getProject()) .configuration( getUnitTestVariant() != null ? getUnitTestVariant().getCompileConfiguration() : null) .build(); }
@Override public Scope getTest() { Scope.Builder builder = Scope.builder(getProject()); UnitTestVariant unitTestVariant = getUnitTestVariant(); if (unitTestVariant != null) { builder.configuration(unitTestVariant.getRuntimeConfiguration()); builder.sourceDirs(getSources(unitTestVariant)); builder.javaResourceDirs(getJavaResources(unitTestVariant)); builder.compilerOptions(Scope.Builder.COMPILER.JAVA, getJavaCompilerOptions(unitTestVariant)); builder.compilerOptions(Scope.Builder.COMPILER.KOTLIN, getKotlinCompilerOptions(true)); } return builder.build(); }