Skip to content

Instantly share code, notes, and snippets.

@tyhdefu
Created January 11, 2022 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyhdefu/0cdf5428be7699a8bb7ef7fa97e278b7 to your computer and use it in GitHub Desktop.
Save tyhdefu/0cdf5428be7699a8bb7ef7fa97e278b7 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+'
}
}
apply plugin: "net.minecraftforge.gradle"
minecraft {
mappings channel: 'official', version: '1.18.1'
}
dependencies {
minecraft 'net.minecraftforge:forge:1.18.1-39.0.14'
}
buildscript {
repositories {
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven(url = "https://maven.minecraftforge.net")
mavenCentral()
}
dependencies {
classpath(group = "net.minecraftforge.gradle", name = "ForgeGradle", version = "5.1.+")
}
}
apply(plugin = "net.minecraftforge.gradle")
minecraft { // <- this gives "Unresolved reference: minecraft". Is there a way to use quotes (untyped I think its called, when I try it thinks im trying to invoke string)
mappings(channel = "official", version = "1.18.1") // <- this gives "Unresolved reference: mappings"
}
dependencies {
"minecraft"("net.minecraftforge:forge:1.18.1-39.0.14") // This seems to work by using quotes.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment