Skip to content

Commit 788e88e

Browse files
author
Weldify
committed
first commit
0 parents  commit 788e88e

File tree

17 files changed

+684
-0
lines changed

17 files changed

+684
-0
lines changed

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
tab_width = 4
8+
trim_trailing_whitespace = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
12+
13+
[*.gradle]
14+
indent_style = tab
15+
16+
[*.java]
17+
indent_style = tab
18+
19+
[*.json]
20+
indent_style = space
21+
indent_size = 2
22+
23+
[fabric.mod.json]
24+
indent_style = tab
25+
tab_width = 2
26+
27+
[*.properties]
28+
indent_style = space
29+
indent_size = 2

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Automatically build the project and run any configured tests for every push
2+
# and submitted pull request. This can help catch issues that only occur on
3+
# certain platforms or Java versions, and provides a first line of defence
4+
# against bad commits.
5+
6+
name: build
7+
on: [pull_request, push]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
# Use these Java versions
14+
java: [
15+
17, # Current Java LTS & minimum supported by Minecraft
16+
]
17+
# and run on both Linux and Windows
18+
os: [ubuntu-latest, windows-latest]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: checkout repository
22+
uses: actions/checkout@v4
23+
- name: validate gradle wrapper
24+
uses: gradle/wrapper-validation-action@v2
25+
- name: setup jdk ${{ matrix.java }}
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: ${{ matrix.java }}
29+
distribution: 'temurin'
30+
- name: make gradle wrapper executable
31+
if: ${{ runner.os != 'Windows' }}
32+
run: chmod +x ./gradlew
33+
- name: build
34+
run: ./gradlew build
35+
- name: capture build artifacts
36+
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: Artifacts
40+
path: build/libs/

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.gradle
2+
.idea
3+
build
4+
run
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
arguments=
2+
auto.sync=false
3+
build.scans.enabled=false
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5+
connection.project.dir=
6+
eclipse.preferences.version=1
7+
gradle.user.home=
8+
java.home=
9+
jvm.arguments=
10+
offline.mode=false
11+
override.workspace.settings=false
12+
show.console.view=false
13+
show.executions.view=false

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2+
Version 2, December 2004
3+
4+
Copyright (C) 2004 Sam Hocevar <[email protected]>
5+
6+
Everyone is permitted to copy and distribute verbatim or modified
7+
copies of this license document, and changing it is allowed as long
8+
as the name is changed.
9+
10+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12+
13+
0. You just DO WHAT THE FUCK YOU WANT TO.

build.gradle

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
plugins {
2+
id 'fabric-loom' version '1.7.bta'
3+
id 'java'
4+
}
5+
6+
import org.gradle.internal.os.OperatingSystem
7+
8+
project.ext.lwjglVersion = "3.3.3"
9+
10+
switch (OperatingSystem.current()) {
11+
case OperatingSystem.LINUX:
12+
project.ext.lwjglNatives = "natives-linux"
13+
break
14+
case OperatingSystem.WINDOWS:
15+
project.ext.lwjglNatives = "natives-windows"
16+
break
17+
case OperatingSystem.MAC_OS:
18+
project.ext.lwjglNatives = "natives-macos"
19+
}
20+
21+
group = project.mod_group
22+
archivesBaseName = project.mod_name
23+
version = project.mod_version
24+
25+
loom {
26+
noIntermediateMappings()
27+
customMinecraftMetadata.set("https://downloads.betterthanadventure.net/bta-client/${project.bta_channel}/v${project.bta_version}/manifest.json")
28+
}
29+
30+
repositories {
31+
mavenCentral()
32+
maven { url = "https://jitpack.io" }
33+
maven {
34+
name = 'Babric'
35+
url = 'https://maven.glass-launcher.net/babric'
36+
}
37+
maven {
38+
name = 'Fabric'
39+
url = 'https://maven.fabricmc.net/'
40+
}
41+
maven {
42+
name = 'SignalumMavenInfrastructure'
43+
url = 'https://maven.thesignalumproject.net/infrastructure'
44+
}
45+
maven {
46+
name = 'SignalumMavenReleases'
47+
url = 'https://maven.thesignalumproject.net/releases'
48+
}
49+
ivy {
50+
url = "https://github.com/Better-than-Adventure"
51+
patternLayout {
52+
artifact "[organisation]/releases/download/v[revision]/[module].jar"
53+
m2compatible = true
54+
}
55+
metadataSources { artifact() }
56+
}
57+
ivy {
58+
url = "https://downloads.betterthanadventure.net/bta-client/${project.bta_channel}/"
59+
patternLayout {
60+
artifact "/v[revision]/client.jar"
61+
m2compatible = true
62+
}
63+
metadataSources { artifact() }
64+
}
65+
ivy {
66+
url = "https://downloads.betterthanadventure.net/bta-server/${project.bta_channel}/"
67+
patternLayout {
68+
artifact "/v[revision]/server.jar"
69+
m2compatible = true
70+
}
71+
metadataSources { artifact() }
72+
}
73+
ivy {
74+
url = "https://piston-data.mojang.com"
75+
patternLayout {
76+
artifact "v1/[organisation]/[revision]/[module].jar"
77+
m2compatible = true
78+
}
79+
metadataSources { artifact() }
80+
}
81+
82+
}
83+
84+
dependencies {
85+
minecraft "::${project.bta_version}"
86+
mappings loom.layered() {}
87+
88+
modRuntimeOnly "objects:client:43db9b498cb67058d2e12d394e6507722e71bb45" // https://piston-data.mojang.com/v1/objects/43db9b498cb67058d2e12d394e6507722e71bb45/client.jar
89+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
90+
91+
// Helper library
92+
// If you do not need Halplibe you can comment this line out or delete this line
93+
modImplementation("turniplabs:halplibe:${project.halplibe_version}")
94+
95+
modImplementation("turniplabs:modmenu-bta:${project.mod_menu_version}")
96+
97+
implementation "org.slf4j:slf4j-api:1.8.0-beta4"
98+
implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"
99+
100+
implementation 'com.google.guava:guava:33.0.0-jre'
101+
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
102+
var log4jVersion = "2.20.0"
103+
implementation("org.apache.logging.log4j:log4j-core:${log4jVersion}")
104+
implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}")
105+
implementation("org.apache.logging.log4j:log4j-1.2-api:${log4jVersion}")
106+
107+
include(implementation("org.apache.commons:commons-lang3:3.12.0"))
108+
109+
modImplementation("com.github.Better-than-Adventure:legacy-lwjgl3:1.0.5")
110+
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
111+
112+
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
113+
runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives"
114+
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
115+
runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
116+
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
117+
runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
118+
implementation "org.lwjgl:lwjgl:$lwjglVersion"
119+
implementation "org.lwjgl:lwjgl-assimp:$lwjglVersion"
120+
implementation "org.lwjgl:lwjgl-glfw:$lwjglVersion"
121+
implementation "org.lwjgl:lwjgl-openal:$lwjglVersion"
122+
implementation "org.lwjgl:lwjgl-opengl:$lwjglVersion"
123+
implementation "org.lwjgl:lwjgl-stb:$lwjglVersion"
124+
}
125+
126+
java {
127+
sourceCompatibility = JavaVersion.VERSION_1_8
128+
targetCompatibility = JavaVersion.VERSION_1_8
129+
withSourcesJar()
130+
}
131+
132+
tasks.withType(JavaCompile).configureEach {
133+
options.release.set 8
134+
}
135+
136+
jar {
137+
from("LICENSE") {
138+
rename { "${it}_${archivesBaseName}" }
139+
}
140+
}
141+
142+
configurations.configureEach {
143+
// Removes LWJGL2 dependencies
144+
exclude group: "org.lwjgl.lwjgl"
145+
}
146+
147+
processResources {
148+
inputs.property "version", version
149+
150+
filesMatching("fabric.mod.json") {
151+
expand "version": version
152+
}
153+
}

gradle.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
org.gradle.jvmargs=-Xmx2G
2+
3+
# BTA
4+
bta_version=7.3_03
5+
bta_channel=release
6+
7+
# Loader
8+
loader_version=0.15.6-bta.7
9+
10+
# Other mods
11+
mod_menu_version=3.0.0
12+
halplibe_version=5.2.4
13+
14+
# Mod
15+
mod_version=1.0.0
16+
mod_group=weldify
17+
mod_name=justauth

gradle/wrapper/gradle-wrapper.jar

58.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)