Skip to content

Commit 156c15e

Browse files
committed
initial commit
0 parents  commit 156c15e

File tree

14 files changed

+759
-0
lines changed

14 files changed

+759
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.idea
2+
build
3+
.gradle
4+
run
5+
.kotlin
6+
logs

LICENSE.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Copyright (c) 2025 Hotkeyyy
2+
All rights reserved.

build.gradle.kts

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
4+
plugins {
5+
kotlin("jvm") version "2.2.20"
6+
id("fabric-loom") version "1.11-SNAPSHOT"
7+
id("maven-publish")
8+
}
9+
10+
version = project.property("mod_version") as String
11+
group = project.property("maven_group") as String
12+
13+
base {
14+
archivesName.set(project.property("archives_base_name") as String)
15+
}
16+
17+
val targetJavaVersion = 21
18+
java {
19+
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
20+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
21+
// if it is present.
22+
// If you remove this line, sources will not be generated.
23+
withSourcesJar()
24+
}
25+
26+
loom {
27+
splitEnvironmentSourceSets()
28+
29+
mods {
30+
register("simplefabricscoreboard") {
31+
sourceSet("main")
32+
sourceSet("client")
33+
}
34+
}
35+
}
36+
37+
fabricApi {
38+
configureDataGeneration {
39+
client = true
40+
}
41+
}
42+
43+
repositories {
44+
// Add repositories to retrieve artifacts from in here.
45+
// You should only use this when depending on other mods because
46+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
47+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
48+
// for more information about repositories.
49+
}
50+
51+
dependencies {
52+
// To change the versions see the gradle.properties file
53+
minecraft("com.mojang:minecraft:${project.property("minecraft_version")}")
54+
mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2")
55+
modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}")
56+
modImplementation("net.fabricmc:fabric-language-kotlin:${project.property("kotlin_loader_version")}")
57+
58+
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}")
59+
}
60+
61+
tasks.processResources {
62+
inputs.property("version", project.version)
63+
inputs.property("minecraft_version", project.property("minecraft_version"))
64+
inputs.property("loader_version", project.property("loader_version"))
65+
filteringCharset = "UTF-8"
66+
67+
filesMatching("fabric.mod.json") {
68+
expand(
69+
"version" to project.version,
70+
"minecraft_version" to project.property("minecraft_version"),
71+
"loader_version" to project.property("loader_version"),
72+
"kotlin_loader_version" to project.property("kotlin_loader_version")
73+
)
74+
}
75+
}
76+
77+
tasks.withType<JavaCompile>().configureEach {
78+
// ensure that the encoding is set to UTF-8, no matter what the system default is
79+
// this fixes some edge cases with special characters not displaying correctly
80+
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
81+
// If Javadoc is generated, this must be specified in that task too.
82+
options.encoding = "UTF-8"
83+
options.release.set(targetJavaVersion)
84+
}
85+
86+
tasks.withType<KotlinCompile>().configureEach {
87+
compilerOptions.jvmTarget.set(JvmTarget.fromTarget(targetJavaVersion.toString()))
88+
}
89+
90+
tasks.jar {
91+
from("LICENSE") {
92+
rename { "${it}_${project.base.archivesName}" }
93+
}
94+
}
95+
96+
// configure the maven publication
97+
publishing {
98+
publications {
99+
create<MavenPublication>("mavenJava") {
100+
from(components["java"])
101+
102+
groupId = group.toString()
103+
artifactId = "simplefabricscoreboard" // <-- dein Artefaktname
104+
version = version.toString()
105+
106+
pom {
107+
name.set("Simple Fabric Scoreboard")
108+
description.set("Eine Beispiel-Bibliothek mit Gradle Kotlin DSL und Maven Publish")
109+
url.set("https://github.com/hotkeyyy/simplefabricscoreboard")
110+
111+
licenses {
112+
license {
113+
name.set("MIT License")
114+
url.set("https://opensource.org/licenses/MIT")
115+
}
116+
}
117+
118+
developers {
119+
developer {
120+
id.set("hotkeyyy")
121+
name.set("Hotkeyyy")
122+
email.set("hotkeyyyde@gmail.com")
123+
}
124+
}
125+
126+
scm {
127+
connection.set("scm:git:git://github.com/hotkeyyy/simplefabricscoreboard.git")
128+
developerConnection.set("scm:git:ssh://github.com/hotkeyyy/simplefabricscoreboard.git")
129+
url.set("https://github.com/hotkeyyy/simplefabricscoreboard")
130+
}
131+
}
132+
}
133+
}
134+
135+
repositories {
136+
// 🧪 Lokales Repository (z. B. zum Testen)
137+
mavenLocal()
138+
139+
// 📦 GitHub Packages (optional)
140+
// maven {
141+
// name = "GitHubPackages"
142+
// url = uri("https://maven.pkg.github.com/deinname/meine-bibliothek")
143+
//
144+
// credentials {
145+
// username = findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
146+
// password = findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
147+
// }
148+
// }
149+
}
150+
}
151+
152+

gradle.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx1G
3+
# Fabric Properties
4+
# check these on https://modmuss50.me/fabric.html
5+
minecraft_version=1.21.5
6+
yarn_mappings=1.21.5+build.1
7+
loader_version=0.17.3
8+
kotlin_loader_version=1.13.6+kotlin.2.2.20
9+
# Mod Properties
10+
mod_version=1.0.3
11+
maven_group=de.hotkeyyy
12+
archives_base_name=simplefabricscoreboard
13+
# Dependencies
14+
# check this on https://modmuss50.me/fabric.html
15+
fabric_version=0.128.2+1.21.5

gradle/wrapper/gradle-wrapper.jar

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

0 commit comments

Comments
 (0)