diff --git a/.gitignore b/.gitignore index 8288ddf..59de195 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,131 @@ -.classpath -.project -.settings/* -.idea -/bin/ -.idea -out +# Created by .ignore support plugin (hsz.mobi) +### Java template +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf +.idea/**/misc.xml +.idea/**/discord.xml +.idea/**/encodings.xml +.idea/codeStyles/ +.idea/sonarlint/ + +# Generated files +.idea/**/contentModel.xml +.idea/**/jarRepositories.xml +.idea/**/uiDesigner.xml +.idea/**/inspectionProfiles +.idea/**/.name +.idea/**/vcs.xml +.idea/**/compiler.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/dbnavigator.xml +.idea/kotlinScripting.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +.idea/modules.xml +.idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Gradle template .gradle -*.iml -build +/**/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +.idea/.gitignore +.idea/modules/ +src/main/resources/ +src/test/ +**/src/main/generated/* -# Exclude run except natives -!run/ -run/* -!run/natives/ \ No newline at end of file +.idea/intellij-javadocs-4.0.1.xml +run \ No newline at end of file diff --git a/.idea/runConfigurations/Run_Client.xml b/.idea/runConfigurations/Run_Client.xml new file mode 100644 index 0000000..1a994bb --- /dev/null +++ b/.idea/runConfigurations/Run_Client.xml @@ -0,0 +1,23 @@ + + + + + + + true + true + false + + + \ No newline at end of file diff --git a/README.md b/README.md index 9f999b5..444fa26 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,4 @@ it is possible to recreate the unreleased version. ## Setup 1. Clone the project -2. Set the VM option ``-Dorg.lwjgl.librarypath="/run/natives"`` -3. Set the working directory to ``./run`` \ No newline at end of file +2. Execute the gradle task ``run`` \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 1e24808..0000000 --- a/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'java' -} - -group 'net.minecraft' -version 'rd-131655' - -repositories { - mavenCentral() -} - -dependencies { - compile group: 'org.lwjgl.lwjgl', name: 'lwjgl', version: '2.9.3' - compile group: 'org.lwjgl.lwjgl', name: 'lwjgl_util', version: '2.9.3' - compile group: 'org.lwjgl.lwjgl', name: 'lwjgl-platform', version: '2.9.3', ext: 'pom' -} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..a580efb --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,36 @@ +plugins { + id("java-library") +} + +group = "net.minecraft" +version = "rd-131655" + +repositories { + mavenCentral() +} + +val natives: Configuration by configurations.creating +natives.isTransitive = true + +dependencies { + implementation(group = "org.lwjgl.lwjgl", name = "lwjgl", version = "2.9.3") + implementation(group = "org.lwjgl.lwjgl", name = "lwjgl_util", version = "2.9.3") + natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-windows") + natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-linux") + natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-osx") +} + + +task("run", JavaExec::class) { + jvmArgs = listOf("-Dorg.lwjgl.librarypath=${project.projectDir.toPath()}\\run\\natives") + main = "com.mojang.rubydung.RubyDung" + classpath = sourceSets["main"].runtimeClasspath + workingDir("${project.projectDir.toPath()}\\run") + dependsOn("extractNatives") +} + +task("extractNatives", Copy::class) { + dependsOn(natives) + from(natives.map { zipTree(it) }) + into("${project.projectDir.toPath()}\\run\\natives") +} \ No newline at end of file diff --git a/run/natives/OpenAL32.dll b/run/natives/OpenAL32.dll deleted file mode 100644 index 1f69e94..0000000 Binary files a/run/natives/OpenAL32.dll and /dev/null differ diff --git a/run/natives/OpenAL64.dll b/run/natives/OpenAL64.dll deleted file mode 100644 index 6f2a2fe..0000000 Binary files a/run/natives/OpenAL64.dll and /dev/null differ diff --git a/run/natives/lwjgl.dll b/run/natives/lwjgl.dll deleted file mode 100644 index e6c97d9..0000000 Binary files a/run/natives/lwjgl.dll and /dev/null differ diff --git a/run/natives/lwjgl64.dll b/run/natives/lwjgl64.dll deleted file mode 100644 index 2c8b93e..0000000 Binary files a/run/natives/lwjgl64.dll and /dev/null differ