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
- classpath 'net.dv8tion:JDA:3.8.3_464'
- classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
- }
- }
- apply plugin: 'java'
- apply plugin: 'net.minecraftforge.gradle'
- apply plugin: "com.github.johnrengelman.shadow"
- def mcVersion = '1.14.3'
- def modVersion = '1.0.0'
- version = mcVersion + '_' + modVersion
- group = "com.tempname.mod"
- archivesBaseName = "tempname"
- sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
- 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: 'snapshot', version: '20190621-1.14.2'
- // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
- // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
- // Default run configurations.
- // These can be tweaked, removed, or duplicated as needed.
- runs {
- client {
- workingDirectory project.file('run')
- // Recommended logging data for a userdev environment
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- // Recommended logging level for the console
- property 'forge.logging.console.level', 'debug'
- mods {
- esu {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- // Recommended logging data for a userdev environment
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- // Recommended logging level for the console
- property 'forge.logging.console.level', 'debug'
- mods {
- esu {
- source sourceSets.main
- }
- }
- }
- data {
- workingDirectory project.file('run')
- // Recommended logging data for a userdev environment
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- // Recommended logging level for the console
- property 'forge.logging.console.level', 'debug'
- args '--mod', 'esu', '--all', '--output', file('src/generated/resources/')
- mods {
- esu {
- source sourceSets.main
- }
- }
- }
- }
- }
- repositories {
- jcenter()
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.14.3-27.0.12'
- shadow('net.dv8tion:JDA:3.8.3_464') {
- exclude module: 'opus-java'
- }
- compile 'org.jetbrains:annotations:15.0'
- }
- shadowJar {
- classifier = ""
- relocate "com.iwebpp.crypto", "com.tempname.discord.repack.com.iwebpp.crypto"
- relocate 'org.apache.commons.collections4', 'com.tempname.discord.repack.org.apache.commons.collections4'
- relocate 'gnu.trove', 'com.tempname.discord.repack.gnu.trove'
- relocate "com.neovisionaries.ws.client", "com.tempname.discord.repack.com.neovisionaries.ws.client"
- relocate "com.iwebpp.crypto", "com.tempname.discord.repack.com.iwebpp.crypto"
- relocate "net.dv8tion.jda", "com.tempname.discord.repack.net.dv8tion.jda"
- relocate "org.json", "com.tempname.discord.repack.org.json"
- relocate "okio", "com.tempname.repack.discord.okio"
- relocate "okhttp3", "com.tempname.discord.repack.okhttp3"
- relocate "org.slf4j", "com.tempname.discord.repack.org.slf4j"
- relocate "org.apache.http", "com.tempname.discord.repack.org.apache.http"
- relocate "org.apache.commons.logging", "com.tempname.discord.repack.org.apache.commons.logging"
- configurations = [project.configurations.shadow]
- dependencies{
- exclude(dependency('org.jetbrains:annotations'))
- }
- }
- processResources {
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", mcVersion
- // replace stuff in mcmod.info, nothing else
- from(sourceSets.main.resources.srcDirs) {
- include 'mcmod.info'
- // replace version and mcversion
- expand 'version': modVersion, 'mcversion': mcVersion
- }
- // copy everything else, that's not the mcmod.info
- from(sourceSets.main.resources.srcDirs) {
- exclude 'mcmod.info'
- }
- }
- reobf {
- shadowJar {
- dependsOn createMcpToSrg
- mappings = createMcpToSrg.output
- }
- }
- artifacts {
- archives shadowJar
- }
- build.dependsOn(shadowJar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement