apply plugin: 'java' apply plugin: 'application' group = 'minecraft' version = '1.12.2' compileJava { sourceCompatibility = targetCompatibility = 1.8 options.encoding = 'UTF-8' } application { mainClassName = 'net.minecraft.client.main.Main' } run { workingDir = new File(buildDir, 'run') if (!workingDir.exists()) { workingDir.mkdir() } systemProperty 'java.library.path', file("$buildDir/natives/windows") args '--version', '1.12.2', '--accessToken', '0', '--assetsDir', 'assets', '--assetIndex', "1.12.2", '--userProperties', '{}' } repositories { mavenLocal() mavenCentral() flatDir { dirs '../libs' } } dependencies { compile name: 'com/mojang/authlib/1.5.25/authlib-1.5.25' compile name: 'com/mojang/text2speech/1.10.3/text2speech-1.10.3' compile name: 'com/mojang/realms/1.10.21/realms-1.10.21' compile name: 'com/mojang/text2speech/1.10.3/text2speech-1.10.3-natives-windows' compile name: 'com/paulscode/codecjorbis/20101023/codecjorbis-20101023' compile name: 'com/paulscode/codecwav/20101023/codecwav-20101023' compile name: 'com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123' compile name: 'com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824' compile name: 'com/paulscode/soundsystem/20120107/soundsystem-20120107' compile name: 'oshi-project/oshi-core/1.1/oshi-core-1.1' compile name: 'org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209' compile name: 'org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209' compile name: 'org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-windows' compile name: 'com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2' compile 'net.java.dev.jna:jna:4.4.0' compile 'net.java.jinput:jinput:2.0.5' compile 'net.java.jinput:jinput-platform:2.0.5' compile 'net.java.jutils:jutils:1.0.0' compile 'net.sf.jopt-simple:jopt-simple:5.0.3' compile 'org.apache.commons:commons-lang3:3.5' compile 'com.google.guava:guava:21.0' compile 'org.apache.logging.log4j:log4j-core:2.8.1' compile 'io.netty:netty-all:4.1.9.Final' compile 'com.google.code.gson:gson:2.8.0' compile 'commons-io:commons-io:2.5' compile 'com.google.code.findbugs:jsr305:3.0.1' compile 'it.unimi.dsi:fastutil:7.1.0' compile 'commons-codec:commons-codec:1.10' } 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" } } }