Search code examples
javamavengradleminecraftminecraft-forge

Unable to compile minecraft mod: Could not resolve all files for configuration ':classpath'


I was downloading a mod from GitHub (Tetra pack https://github.com/Noobulus/Tetra-Pak/tree/1.18) because the 1.18 version was not yet released as a compiled jar. I ran the gradlew build but It threw this error

A problem occurred configuring root project 'Tetra-Pak-1.18'. Could not resolve all files for configuration ':classpath'. Could not resolve com.github.gmazzo:gradle-buildconfig-plugin:3.0.1. Required by: project : > com.github.gmazzo.buildconfig:com.github.gmazzo.buildconfig.gradle.plugin:3.0.1 Could not resolve com.github.gmazzo:gradle-buildconfig-plugin:3.0.1. Could not get resource 'https://dist.creeper.host/Sponge/maven/com/github/gmazzo/gradle-buildconfig-plugin/3.0.1/gradle-buildconfig-plugin-3.0.1.pom'. Could not HEAD 'https://dist.creeper.host/Sponge/maven/com/github/gmazzo/gradle-buildconfig-plugin/3.0.1/gradle-buildconfig-plugin-3.0.1.pom'. Read timed out

here is the buildscript from build.Gradle.

buildscript {
repositories {
    maven { url = 'https://files.minecraftforge.net/maven' }
    mavenCentral()
    maven { url = 'https://dist.creeper.host/Sponge/maven' }
    maven { url = 'https://repo.spongepowered.org/maven' }
}
dependencies {
    classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
    classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
}
}

Solution

  • Solved! I just removed the dependency that was giving the error from build.gradle.