buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
import net.minecraftforge.gradle.common.Constants
import net.minecraftforge.gradle.delayed.DelayedFile
import net.minecraftforge.gradle.tasks.user.reobf.ArtifactSpec
import net.minecraftforge.gradle.tasks.user.reobf.ReobfTask
import net.minecraftforge.gradle.user.UserBasePlugin
import net.minecraftforge.gradle.user.UserExtension
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'eclipse'
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
compileJava.options.encoding = 'UTF-8'
repositories {
maven {
name 'forge'
url 'http://files.minecraftforge.net/maven'
}
mavenCentral()
maven {
name 'sonatypeSnapshot'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'minecraft'
url 'https://libraries.minecraft.net/'
}
}
dependencies {
compile 'net.minecraft:launchwrapper:1.11'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'org.ow2.asm:asm-debug-all:5.0.3'
compile 'com.typesafe.akka:akka-actor_2.11:2.3.3'
compile 'com.typesafe:config:1.2.1'
compile 'org.scala-lang:scala-actors-migration_2.11:1.1.0'
compile 'org.scala-lang:scala-compiler:2.11.1'
compile 'org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2'
compile 'org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2'
compile 'org.scala-lang:scala-library:2.11.1'
compile 'org.scala-lang:scala-parser-combinators_2.11:1.0.1'
compile 'org.scala-lang:scala-reflect:2.11.1'
compile 'org.scala-lang:scala-swing_2.11:1.0.1'
compile 'org.scala-lang:scala-xml_2.11:1.0.2'
compile 'net.sf.jopt-simple:jopt-simple:4.5'
compile 'lzma:lzma:0.0.1'
compile 'com.mojang:realms:1.3.5'
compile 'org.apache.commons:commons-compress:1.8.1'
compile 'org.apache.httpcomponents:httpclient:4.3.3'
compile 'commons-logging:commons-logging:1.1.3'
compile 'org.apache.httpcomponents:httpcore:4.3.2'
compile 'java3d:vecmath:1.3.1'
compile 'net.sf.trove4j:trove4j:3.0.3'
compile 'com.ibm.icu:icu4j-core-mojang:51.2'
compile 'com.paulscode:codecjorbis:20101023'
compile 'com.paulscode:codecwav:20101023'
compile 'com.paulscode:libraryjavasound:20101123'
compile 'com.paulscode:librarylwjglopenal:20100824'
compile 'com.paulscode:soundsystem:20120107'
compile 'io.netty:netty-all:4.0.10.Final'
compile 'com.google.guava:guava:16.0'
compile 'org.apache.commons:commons-lang3:3.2.1'
compile 'commons-io:commons-io:2.4'
compile 'commons-codec:commons-codec:1.9'
compile 'net.java.jinput:jinput:2.0.5'
compile 'net.java.jutils:jutils:1.0.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.mojang:authlib:1.5.16'
compile 'org.apache.logging.log4j:log4j-api:2.0-beta9'
compile 'org.apache.logging.log4j:log4j-core:2.0-beta9'
compile 'org.lwjgl.lwjgl:lwjgl:2.9.1'
compile 'org.lwjgl.lwjgl:lwjgl_util:2.9.1'
compile 'tv.twitch:twitch:5.16'
compile 'org.yaml:snakeyaml:1.13'
compile 'com.lmax:disruptor:3.2.1'
compile 'mysql:mysql-connector-java:5.1.31'
compile 'commons-pool:commons-pool:1.6'
compile 'commons-dbcp:commons-dbcp:1.4'
testCompile "org.codehaus.groovy:groovy-all:2.3.0"
testCompile "org.spockframework:spock-core:1.0-groovy-2.0-SNAPSHOT"
testCompile 'junit:junit:4.5'
testRuntime "cglib:cglib-nodep:2.2.2"
testRuntime "org.objenesis:objenesis:1.2"
}
project.getExtensions().create(Constants.EXT_NAME_MC, UserExtension, { return project } as UserBasePlugin)
task reobf(type: ReobfTask) {
setExceptorCfg(delayedFile('conf/srg.exc'))
setSrg(delayedFile('conf/mcp2srg.srg'))
setFieldCsv(delayedFile('conf/fields.csv'))
setFieldCsv(delayedFile('conf/methods.csv'))
reobf(tasks.getByName('jar'), new Action<ArtifactSpec>() {
@Override
public void execute(ArtifactSpec arg0)
{
JavaPluginConvention javaConv = (JavaPluginConvention) getConvention().getPlugins().get("java")
arg0.setClasspath(javaConv.getSourceSets().getByName("main").getCompileClasspath())
}
})
mustRunAfter("test")
}
assemble.dependsOn("reobf")
task dumpLibs(type: Copy) {
into "$buildDir/libs/libs"
from configurations.compile
}
def delayedFile(String path) {
new DelayedFile(project, path) {
@Override
File resolveDelayed() {
return file(path)
}
}
}