forked from mirrors/SpecialMobs
106 lines
2.9 KiB
Groovy
106 lines
2.9 KiB
Groovy
|
buildscript {
|
||
|
repositories {
|
||
|
maven { url = 'https://maven.minecraftforge.net' }
|
||
|
mavenCentral()
|
||
|
}
|
||
|
dependencies {
|
||
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
|
||
|
}
|
||
|
}
|
||
|
apply plugin: 'net.minecraftforge.gradle'
|
||
|
apply plugin: 'eclipse'
|
||
|
apply plugin: 'maven-publish'
|
||
|
|
||
|
// The mod's version and id
|
||
|
version = "${mc_version}-${mod_version}"
|
||
|
archivesBaseName = 'specialmobs'
|
||
|
group = "fathertoast.${archivesBaseName}"
|
||
|
|
||
|
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 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: 'official', version: "${mc_version}"
|
||
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||
|
|
||
|
runs {
|
||
|
client {
|
||
|
workingDirectory project.file('run')
|
||
|
|
||
|
property 'forge.logging.markers', 'REGISTRIES'
|
||
|
property 'forge.logging.console.level', 'debug'
|
||
|
|
||
|
mods {
|
||
|
deadlyworld {
|
||
|
source sourceSets.main
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
workingDirectory project.file('run')
|
||
|
|
||
|
property 'forge.logging.markers', 'REGISTRIES'
|
||
|
property 'forge.logging.console.level', 'debug'
|
||
|
|
||
|
mods {
|
||
|
deadlyworld {
|
||
|
source sourceSets.main
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
data {
|
||
|
workingDirectory project.file('run')
|
||
|
|
||
|
property 'forge.logging.markers', 'REGISTRIES'
|
||
|
property 'forge.logging.console.level', 'debug'
|
||
|
|
||
|
args '--mod', 'deadlyworld', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||
|
|
||
|
mods {
|
||
|
deadlyworld {
|
||
|
source sourceSets.main
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Include resources generated by data generators.
|
||
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||
|
|
||
|
repositories {
|
||
|
// Repos for mods to include during development
|
||
|
maven {
|
||
|
name 'prog'
|
||
|
url 'http://dvs1.progwml6.com/files/maven'
|
||
|
}
|
||
|
maven {
|
||
|
name 'tterrag'
|
||
|
url 'https://maven.tterrag.com/'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
||
|
|
||
|
// Add in JEI and TOP to assist debugging during development
|
||
|
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")
|
||
|
runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-${top_version}")
|
||
|
}
|
||
|
|
||
|
jar.finalizedBy('reobfJar')
|
||
|
|
||
|
publishing {
|
||
|
publications {
|
||
|
mavenJava(MavenPublication) {
|
||
|
artifact jar
|
||
|
}
|
||
|
}
|
||
|
repositories {
|
||
|
maven {
|
||
|
url "file:///${project.projectDir}/mcmodsrepo"
|
||
|
}
|
||
|
}
|
||
|
}
|