Skip to content

Commit 65e904b

Browse files
committed
improve .gitignore, replace build gradle with kotlin dsl, add gradle run configuration
1 parent 9db1511 commit 65e904b

File tree

5 files changed

+189
-31
lines changed

5 files changed

+189
-31
lines changed

.gitignore

+129-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,131 @@
1-
.classpath
2-
.project
3-
.settings/*
4-
.idea
5-
/bin/
6-
.idea
7-
out
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Java template
3+
# Compiled class file
4+
*.class
5+
6+
# Log file
7+
*.log
8+
9+
# BlueJ files
10+
*.ctxt
11+
12+
# Mobile Tools for Java (J2ME)
13+
.mtj.tmp/
14+
15+
# Package Files #
16+
*.jar
17+
*.war
18+
*.nar
19+
*.ear
20+
*.zip
21+
*.tar.gz
22+
*.rar
23+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
24+
hs_err_pid*
25+
26+
### JetBrains template
27+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
28+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
29+
30+
# User-specific stuff
31+
.idea/**/workspace.xml
32+
.idea/**/tasks.xml
33+
.idea/**/usage.statistics.xml
34+
.idea/**/dictionaries
35+
.idea/**/shelf
36+
.idea/**/misc.xml
37+
.idea/**/discord.xml
38+
.idea/**/encodings.xml
39+
.idea/codeStyles/
40+
.idea/sonarlint/
41+
42+
# Generated files
43+
.idea/**/contentModel.xml
44+
.idea/**/jarRepositories.xml
45+
.idea/**/uiDesigner.xml
46+
.idea/**/inspectionProfiles
47+
.idea/**/.name
48+
.idea/**/vcs.xml
49+
.idea/**/compiler.xml
50+
51+
# Sensitive or high-churn files
52+
.idea/**/dataSources/
53+
.idea/**/dataSources.ids
54+
.idea/**/dataSources.local.xml
55+
.idea/**/sqlDataSources.xml
56+
.idea/**/dynamic.xml
57+
.idea/**/dbnavigator.xml
58+
.idea/kotlinScripting.xml
59+
60+
# Gradle
61+
.idea/**/gradle.xml
62+
.idea/**/libraries
63+
64+
# Gradle and Maven with auto-import
65+
# When using Gradle or Maven with auto-import, you should exclude module files,
66+
# since they will be recreated, and may cause churn. Uncomment if using
67+
# auto-import.
68+
# .idea/artifacts
69+
# .idea/compiler.xml
70+
.idea/modules.xml
71+
.idea/*.iml
72+
# .idea/modules
73+
# *.iml
74+
# *.ipr
75+
76+
# CMake
77+
cmake-build-*/
78+
79+
# Mongo Explorer plugin
80+
.idea/**/mongoSettings.xml
81+
82+
# File-based project format
83+
*.iws
84+
85+
# IntelliJ
86+
out/
87+
88+
# mpeltonen/sbt-idea plugin
89+
.idea_modules/
90+
91+
# JIRA plugin
92+
atlassian-ide-plugin.xml
93+
94+
# Cursive Clojure plugin
95+
.idea/replstate.xml
96+
97+
# Crashlytics plugin (for Android Studio and IntelliJ)
98+
com_crashlytics_export_strings.xml
99+
crashlytics.properties
100+
crashlytics-build.properties
101+
102+
# Editor-based Rest Client
103+
.idea/httpRequests
104+
105+
# Android studio 3.1+ serialized cache file
106+
.idea/caches/build_file_checksums.ser
107+
108+
### Gradle template
8109
.gradle
9-
*.iml
10-
build
110+
/**/build/
111+
112+
# Ignore Gradle GUI config
113+
gradle-app.setting
114+
115+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
116+
!gradle-wrapper.jar
117+
118+
# Cache of project
119+
.gradletasknamecache
120+
121+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
122+
# gradle/wrapper/gradle-wrapper.properties
123+
124+
.idea/.gitignore
125+
.idea/modules/
126+
src/main/resources/
127+
src/test/
128+
**/src/main/generated/*
11129

12-
# Exclude run except natives
13-
!run/
14-
run/*
15-
!run/natives/
130+
.idea/intellij-javadocs-4.0.1.xml
131+
run

.idea/runConfigurations/Run_Client.xml

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ Development phase: May 13, 2009 (22:11 - 23:28 UTC+2)
1515

1616
## Setup
1717
1. Clone the project
18-
2. Set the VM option ``-Dorg.lwjgl.librarypath="<path_to_project>/run/natives"``
19-
3. Set the working directory to ``./run``
18+
2. Execute the gradle task ``run``

build.gradle

-16
This file was deleted.

build.gradle.kts

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
plugins {
2+
id("java-library")
3+
}
4+
5+
group = "net.minecraft"
6+
version = "rd-131655"
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
val natives: Configuration by configurations.creating
13+
natives.isTransitive = true
14+
15+
dependencies {
16+
implementation(group = "org.lwjgl.lwjgl", name = "lwjgl", version = "2.9.3")
17+
implementation(group = "org.lwjgl.lwjgl", name = "lwjgl_util", version = "2.9.3")
18+
natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-windows")
19+
natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-linux")
20+
natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-osx")
21+
}
22+
23+
24+
task("run", JavaExec::class) {
25+
jvmArgs = listOf("-Dorg.lwjgl.librarypath=${project.projectDir.toPath()}\\run\\natives")
26+
main = "com.mojang.rubydung.RubyDung"
27+
classpath = sourceSets["main"].runtimeClasspath
28+
workingDir("${project.projectDir.toPath()}\\run")
29+
dependsOn("extractNatives")
30+
}
31+
32+
task("extractNatives", Copy::class) {
33+
dependsOn(natives)
34+
from(natives.map { zipTree(it) })
35+
into("${project.projectDir.toPath()}\\run\\natives")
36+
}

0 commit comments

Comments
 (0)