Skip to content

Instantly share code, notes, and snippets.

@Asherslab
Created May 1, 2018 06:11
Show Gist options
  • Select an option

  • Save Asherslab/455477023804c44fecdd58b6dd78754b to your computer and use it in GitHub Desktop.

Select an option

Save Asherslab/455477023804c44fecdd58b6dd78754b to your computer and use it in GitHub Desktop.
ChatChainMC gradle
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "https://files.minecraftforge.net/maven"
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
}
}
plugins {
id 'io.franzbecker.gradle-lombok' version '1.12'
id 'net.ltgt.apt' version '0.10'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: "net.minecraftforge.gradle.forge"
version = modVersion
group = modGroup
archivesBaseName = modBaseName
minecraft {
version = project.forgeVersion
runDir = "run"
// 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 = project.mcpVersion
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
}
compileClasspath += sourceSets.api.output
}
}
repositories {
ivy {
name 'Minecolonies TeamCity Repo'
ivyPattern 'http://teamcity.minecolonies.com/guestAuth/repository/download/[module]/[revision]/teamcity-ivy.xml'
artifactPattern 'http://teamcity.minecolonies.com/guestAuth/repository/download/[module]/[revision]/[artifact](.[ext])'
}
mavenCentral()
jcenter()
maven {
name 'drnaylor'
url 'http://repo.drnaylor.co.uk/artifactory/list/quickstart'
}
}
dependencies {
compile('org.jetbrains:annotations:15.0')
compile('org.projectlombok:lombok:1.16.18')
apt('org.projectlombok:lombok:1.16.18')
compile('ninja.leaping.configurate:configurate-hocon:2.1')
compile 'org.java-websocket:Java-WebSocket:1.3.4'
//compile('com.google.inject:guice:4.0')
//compile('uk.co.drnaylor:quickstart-moduleloader:0.8.2')
//compile('io.github.lukehutch:fast-classpath-scanner')
compile ('org:DiscordianConnect_Release:' + discordianConnectVersion) {
artifact {
name = 'discordianconnect-0.0.1.' + discordianConnectVersion + '-all'
type = 'jar'
}
artifact {
name = 'discordianconnect-0.0.1.' + discordianConnectVersion + '-sources'
type = 'jar'
}
}
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", '1.0'
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
// replace version and mcversion
expand "version": project.version, "mcversion": project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
}
shadowJar {
exclude 'META-INF'
exclude 'com.typesafe:config:1.2.1'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment