apply plugin: 'java' apply plugin: 'application' group = 'minecraft' version = 'a1.1.2_01' compileJava { sourceCompatibility = targetCompatibility = 1.8 options.encoding = 'UTF-8' } application { mainClassName = 'net.minecraft.client.Minecraft' } run { workingDir = new File(buildDir, 'run') if (!workingDir.exists()) { workingDir.mkdir() } systemProperty 'java.library.path', file("$buildDir/natives/windows") } repositories { flatDir { dirs '../libs' } } dependencies { compile name: 'org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0' compile name: 'org/lwjgl/lwjgl/lwjgl-platform/2.9.0/lwjgl-platform-2.9.0-natives-windows' compile name: 'org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0' compile name: 'net/java/jinput/jinput/2.0.5/jinput-2.0.5' compile name: 'net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows' compile name: 'net/java/jutils/jutils/1.0.0/jutils-1.0.0' compile name: 'paulscode' } task copyNativesWindows { doLast { copy { def resolvedArtifacts = configurations.compile.resolvedConfiguration.resolvedArtifacts def matches = resolvedArtifacts.findAll {it.classifier == 'natives-windows' || it.name.endsWith('-natives-windows')} from matches.collect { it.file }.collect { zipTree(it) } into "$buildDir/natives/windows" } } }