mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
Migrate ATs to JavaExec and make them quiet
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package net.fabricmc.loom.util;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.file.FileCollection;
|
||||
|
||||
/**
|
||||
* Simplified dependency downloading.
|
||||
*
|
||||
* @author Juuz
|
||||
*/
|
||||
public final class DependencyDownloader {
|
||||
/**
|
||||
* Resolves a dependency as well as its transitive dependencies into a {@link FileCollection}.
|
||||
*
|
||||
* @param project the project needing these files
|
||||
* @param dependencyNotation the dependency notation
|
||||
* @return the resolved files
|
||||
*/
|
||||
public static FileCollection download(Project project, String dependencyNotation) {
|
||||
var dependency = project.getDependencies().create(dependencyNotation);
|
||||
var config = project.getConfigurations().detachedConfiguration(dependency);
|
||||
return config.fileCollection(dep -> true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user