Skip to content

Instantly share code, notes, and snippets.

@Cadiboo
Last active February 18, 2019 11:58
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 Cadiboo/8a7976add44f5d3e6ca0b282dac428f9 to your computer and use it in GitHub Desktop.
Save Cadiboo/8a7976add44f5d3e6ca0b282dac428f9 to your computer and use it in GitHub Desktop.
big thonk
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
version = modMinecraftVersion + "-" + modVersion
group = modGroup
archivesBaseName = modFileName
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenLocal()
// Put other remote maven repositories here
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
}
}
minecraft {
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: modMcpMappingsChannel, version: modMcpMappingsVersion
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// replace "@VERSION@", project.version
// replace '@FINGERPRINT@', project.findProperty('signSHA1')
// replaceIn modReferenceClass
// default run configurations.
// these can be tweaked, removed, or duplicated as needed.
runs {
client = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
server = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
}
}
dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft "net.minecraftforge:forge:" + modMinecraftVersion + "-" + modForgeVersion
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// These dependencies get remapped to your current MCP mappings
//deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
deobf "renderchunk-rebuildchunk-hooks:RenderChunk-rebuildChunk-Hooks:1.13.2:0.4.0"
// compile fileTree(dir: 'libs', include: '*.jar')
}
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title" : modId,
"Specification-Vendor" : modGroup,
"Specification-Version" : "24.0", // We are version 1 of the modlauncher specification
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : modGroup,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
],)
}
}
import net.minecraftforge.gradle.common.task.SignJar
task signJar(type: SignJar, dependsOn: jar) {
// Skips if the keyStore property is missing.
onlyIf {
project.hasProperty('keyStore')
}
// findProperty allows us to reference the property without it existing.
// Using project.propName would cause the script to fail validation if the property did not exist.
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}
// Runs this task automatically when build is run.
build.dependsOn signJar
22:56:20: Executing task 'prepareRun'...
> Configure project :
New Dep: net.minecraftforge:forge:1.13.2-25.0.20_mapped_snapshot_20180921-1.13_at_0cb4bf0124b250fed1cd6009768d11a0d58258d5
> Task :wrapper
BUILD SUCCESSFUL in 10s
1 actionable task: 1 executed
> Configure project :
New Dep: net.minecraftforge:forge:1.13.2-25.0.20_mapped_snapshot_20180921-1.13_at_0cb4bf0124b250fed1cd6009768d11a0d58258d5
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find renderchunk-rebuildchunk-hooks:RenderChunk-rebuildChunk-Hooks:1.13.2_mapped_snapshot_20180921-1.13.
Searched in the following locations:
- file:/Users/Cadiboo/.m2/repository/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- file:/Users/Cadiboo/.m2/repository/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://minecraft.curseforge.com/api/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- https://minecraft.curseforge.com/api/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- file:/Users/Cadiboo/.gradle/caches/forge_gradle/bundeled_repo/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- file:/Users/Cadiboo/.gradle/caches/forge_gradle/bundeled_repo/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://files.minecraftforge.net/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- https://files.minecraftforge.net/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://libraries.minecraft.net/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://repo.maven.apache.org/maven2/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- https://repo.maven.apache.org/maven2/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 11s
1 actionable task: 1 executed
Could not find renderchunk-rebuildchunk-hooks:RenderChunk-rebuildChunk-Hooks:1.13.2_mapped_snapshot_20180921-1.13.
Searched in the following locations:
- file:/Users/Cadiboo/.m2/repository/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- file:/Users/Cadiboo/.m2/repository/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://minecraft.curseforge.com/api/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- https://minecraft.curseforge.com/api/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- file:/Users/Cadiboo/.gradle/caches/forge_gradle/bundeled_repo/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- file:/Users/Cadiboo/.gradle/caches/forge_gradle/bundeled_repo/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://files.minecraftforge.net/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- https://files.minecraftforge.net/maven/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://libraries.minecraft.net/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
- https://repo.maven.apache.org/maven2/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.pom
- https://repo.maven.apache.org/maven2/renderchunk-rebuildchunk-hooks/RenderChunk-rebuildChunk-Hooks/1.13.2_mapped_snapshot_20180921-1.13/RenderChunk-rebuildChunk-Hooks-1.13.2_mapped_snapshot_20180921-1.13.jar
Required by:
project :
22:56:42: Task execution finished 'prepareRun'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment