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'
- apply plugin: 'eclipse'
- apply plugin: 'maven-publish'
- version = '1.0'
- group = 'com.yourname.modid'
- archivesBaseName = 'modid'
- sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
- minecraft {
- mappings channel: 'snapshot', version: '20180921-1.13'
- runs {
- client {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- }
- }
- repositories {
- mavenCentral()
- }
- configurations {
- embed
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.13.2-25.0.191'
- embed 'org.hibernate:hibernate-agroal:5.3.10.Final'
- embed group: 'mysql', name: 'mysql-connector-java', version: '8.0.15'
- compile 'org.hibernate:hibernate-agroal:5.3.10.Final'
- compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.15'
- }
- jar {
- manifest {
- attributes([
- "Specification-Title": "examplemod",
- "Specification-Vendor": "examplemodsareus",
- "Specification-Version": "1", // We are version 1 of ourselves
- "Implementation-Title": project.name,
- "Implementation-Version": "${version}",
- "Implementation-Vendor" :"examplemodsareus",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
- ])
- }
- from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
- }
- def reobfFile = file("$buildDir/reobfJar/output.jar")
- def reobfArtifact = artifacts.add('default', reobfFile) {
- type 'jar'
- builtBy 'reobfJar'
- }
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact reobfArtifact
- }
- }
- repositories {
- maven {
- url "file:///${project.projectDir}/mcmodsrepo"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement