From 4b39e3af8d3c0fe9f0ae03391715ff586bccf56d Mon Sep 17 00:00:00 2001 From: LexManos Date: Sun, 17 Jan 2021 21:08:21 -0800 Subject: Allow missing metadata --- .../minecraftforge/artifactural/gradle/GradleRepositoryAdapter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gradlecomp/java/net') diff --git a/src/gradlecomp/java/net/minecraftforge/artifactural/gradle/GradleRepositoryAdapter.java b/src/gradlecomp/java/net/minecraftforge/artifactural/gradle/GradleRepositoryAdapter.java index 87cd246..0970397 100644 --- a/src/gradlecomp/java/net/minecraftforge/artifactural/gradle/GradleRepositoryAdapter.java +++ b/src/gradlecomp/java/net/minecraftforge/artifactural/gradle/GradleRepositoryAdapter.java @@ -91,6 +91,10 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen DefaultMavenLocalArtifactRepository maven = (DefaultMavenLocalArtifactRepository)factory.createMavenLocalRepository(); // We use maven local because it bypasses the caching and coping to .m2 maven.setUrl(local); maven.setName(name); + maven.metadataSources(m -> { + m.mavenPom(); + m.artifact(); + }); GradleRepositoryAdapter repo; @@ -139,7 +143,7 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen public ConfiguredModuleComponentRepository createResolver() { MavenResolver resolver = (MavenResolver)local.createResolver(); - GeneratingFileResourceRepository repo = new GeneratingFileResourceRepository(); + GeneratingFileResourceRepository repo = new GeneratingFileResourceRepository(); ReflectionUtils.alter(resolver, "repository", prev -> repo); // ExternalResourceResolver.repository //ReflectionUtils.alter(resolver, "metadataSources", ); //ExternalResourceResolver.metadataSources We need to fix these from returning 'missing' // MavenResolver -> MavenMetadataLoader -> FileCacheAwareExternalResourceAccessor -> DefaultCacheAwareExternalResourceAccessor -- cgit