Skip to content

Instantly share code, notes, and snippets.

@WOSAJ
Created May 5, 2022 12:28
Show Gist options
  • Save WOSAJ/b430ffc411d0ea38f59ae0d311e218e3 to your computer and use it in GitHub Desktop.
Save WOSAJ/b430ffc411d0ea38f59ae0d311e218e3 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '1.0'
group = 'tk.wosaj'
archivesBaseName = 'redixstory'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
mappings channel: 'snapshot', version: '20210309-1.16.5'
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
examplemod {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
examplemod {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', 'redixstory', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
examplemod {
source sourceSets.main
}
}
}
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
minecraft 'net.minecraftforge:forge:1.16.5-36.2.34'
}
jar {
manifest {
attributes([
"Specification-Title": "redixstory",
"Specification-Version": "1",
"Implementation-Title": project.name
])
}
}
jar.finalizedBy('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment