public void setupBuckBinary() { OkBuckExtension okbuckExt = ProjectUtil.getOkBuckExtension(rootProject); // Create dependency cache for buck binary if needed if (okbuckExt.buckBinary != null) { Configuration buckConfig = rootProject.getConfigurations().maybeCreate(BUCK_BINARY_CONFIGURATION); rootProject .getRepositories() .maven(mavenArtifactRepository -> mavenArtifactRepository.setUrl(JITPACK_URL)); rootProject.getDependencies().add(BUCK_BINARY_CONFIGURATION, okbuckExt.buckBinary); Set<File> resolvedFiles = buckConfig.getResolvedConfiguration().getFiles(); Preconditions.checkArgument(resolvedFiles.size() == 1); realBuckBinaryPath = resolvedFiles.iterator().next().toPath(); } }
protected Optional<String> getPayaraMicroPath(String version) { DependencyHandler dependencyHandler = project.getDependencies(); Dependency dependency = dependencyHandler.create(MICRO_GROUPID + ":" + MICRO_ARTIFACTID + ":" + version); return project.getConfigurations() .detachedConfiguration(dependency) .getResolvedConfiguration() .getFiles() .stream() .findAny() .map(File::getAbsolutePath); }
@InputFiles @SuppressWarnings("unused") // lets Gradle know when to not skip the task public FileCollection getDependencyFiles() { return getProject().files(getConfiguration().getResolvedConfiguration().getFiles()); }
deps.add(CONFIG_FFI_DEPS, project.files(buildscriptClasspath.getResolvedConfiguration().getFiles(new Spec<Dependency>() { @Override public boolean isSatisfiedBy(Dependency element)