CompileDependenciesProvider (DeprecatedDependencyResolver resolver) { // resolve compile dependencies boolean isMainSourceSet = mySourceSet.getName().equals(SourceSet.MAIN_SOURCE_SET_NAME); String deprecatedCompileConfigurationName = isMainSourceSet ? "compile" : StringUtils.toCamelCase(mySourceSet.getName(), false) + "Compile"; Object configurationName = invokeMethod(mySourceSet, "getCompileConfigurationName"); assert configurationName != null; String compileConfigurationName = configurationName.toString(); myConfiguration = myProject.getConfigurations().findByName(deprecatedCompileConfigurationName); myCompileClasspathConfiguration = myProject.getConfigurations().findByName(compileConfigurationName + "Classpath"); myCompileConfiguration = myProject.getConfigurations().findByName(compileConfigurationName); Configuration compileConfiguration = myCompileClasspathConfiguration != null ? myCompileClasspathConfiguration : myCompileConfiguration; myCompileOnlyConfiguration = DeprecatedDependencyResolver.isJavaLibraryPluginSupported ? myProject.getConfigurations().findByName(mySourceSet.getCompileOnlyConfigurationName()) : null; ExternalDepsResolutionResult externalDepsResolutionResult = resolver.resolveDependencies(compileConfiguration, SCOPE); myDependencies = externalDepsResolutionResult.getExternalDeps(); myFiles = externalDepsResolutionResult.getResolvedFiles(); return this; }