mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
add support for new dependencyResolutionManagement (#400)
* move repo declartions - Move repository declartions in MavenConfiguration.java to LoomRepositoryPlugin.java * move repo declartions - Move repository declartions in MinecraftMappedProvider.java to LoomRepositoryPlugin.java * move repo declartions - Move repository declarations in MinecraftProcessedProvider.java to LoomRepositoryPlugin.java * do not add repositories if dependencyResolutionManagement is used * Simplify the change on LoomGradlePlugin - this is the suggestion from liach * change name to follow fabric naming convension - change getProjectUUID to getProjectUuid - change PROJECT_MAPPED_CLASSIFIER to projectMappedClassifier * remove MavenConfiguration.java - the file currently do nothing. * clean-up for all `instanceof` clause * add DependencyResolutionManagementTest * code cleanup * Update src/test/resources/projects/dependencyResolutionManagement/projmap/src/main/resources/modid.accesswidener * change project uuid to project full name Co-authored-by: modmuss50 <modmuss50@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.PluginAware;
|
||||
|
||||
import net.fabricmc.loom.configuration.CompileConfiguration;
|
||||
import net.fabricmc.loom.configuration.FabricApiExtension;
|
||||
@@ -40,12 +41,20 @@ import net.fabricmc.loom.configuration.providers.mappings.MappingsCache;
|
||||
import net.fabricmc.loom.decompilers.DecompilerConfiguration;
|
||||
import net.fabricmc.loom.task.LoomTasks;
|
||||
|
||||
public class LoomGradlePlugin implements Plugin<Project> {
|
||||
public class LoomGradlePlugin implements Plugin<PluginAware> {
|
||||
public static boolean refreshDeps;
|
||||
public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
|
||||
public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
|
||||
@Override
|
||||
public void apply(PluginAware target) {
|
||||
target.getPlugins().apply(LoomRepositoryPlugin.class);
|
||||
|
||||
if (target instanceof Project project) {
|
||||
apply(project);
|
||||
}
|
||||
}
|
||||
|
||||
public void apply(Project project) {
|
||||
project.getLogger().lifecycle("Fabric Loom: " + LoomGradlePlugin.class.getPackage().getImplementationVersion());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user