Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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'
- apply plugin: 'maven-publish'
- version = '1.0'
- group = 'dev.elrol.blutechmecha' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
- archivesBaseName = 'blutechmecha'
- sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
- 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: '20201028-1.16.3'
- runs {
- client {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- mods {
- blutechmecha {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- mods {
- blutechmecha {
- source sourceSets.main
- }
- }
- }
- data {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- args '--mod', 'blutechmecha', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
- mods {
- blutechmecha {
- source sourceSets.main
- }
- }
- }
- }
- }
- sourceSets.main.resources { srcDir 'src/generated/resources' }
- repositories {
- mavenLocal()
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.16.4-35.1.37'
- // compile files("libs/Blutech-Materials-1.0.1.jar")
- compile fg.deobf('dev.elrol:blutech:1.0.1')
- }
- // Example for how to get properties into the manifest for reading by the runtime..
- jar {
- manifest {
- attributes([
- "Specification-Title": "blutechmecha",
- "Specification-Vendor": "blutechmecha",
- "Specification-Version": "1", // We are version 1 of ourselves
- "Implementation-Title": project.name,
- "Implementation-Version": "${version}",
- "Implementation-Vendor" :"blutechmecha",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
- ])
- }
- }
- // Example configuration to allow publishing using the maven-publish task
- // This is the preferred method to reobfuscate your jar file
- jar.finalizedBy('reobfJar')
- // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
- //publish.dependsOn('reobfJar')
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact jar
- }
- }
- repositories {
- maven {
- url "file:///${project.projectDir}/mcmodsrepo"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement