diff options
-rw-r--r-- | build.gradle | 13 | ||||
-rw-r--r-- | src/gradlecomp/java/net/minecraftforge/artifactural/gradle/GradleRepositoryAdapter.java | 6 |
2 files changed, 8 insertions, 11 deletions
diff --git a/build.gradle b/build.gradle index 10b9def..a1aa9e9 100644 --- a/build.gradle +++ b/build.gradle @@ -7,16 +7,9 @@ plugins { } group = 'net.minecraftforge' -version = gitVersion() - -def gitVersion() { - def raw = grgit.describe(longDescr: true, tags: true) - def desc = (raw == null ? 'unknown-unknown-unknown' : raw).split('-') as List - def hash = desc.remove(desc.size() - 1) - def offset = desc.remove(desc.size() - 1) - def tag = desc.join('-') - return "${tag}.${offset}" -} + +version = (grgit.describe(longDescr: true, tags: true) ?: 'unknown-unknown-unknown').split('-').with { "${it[0]}.${it[1]}" } +println('Version: ' + version + ' Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) sourceSets { api 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 |