Skip to content

Commit ffb9792

Browse files
committed
up fabric1.21.4
1 parent 5185822 commit ffb9792

26 files changed

+1305
-4
lines changed

.github/workflows/gradle.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,28 @@ jobs:
237237
with:
238238
name: "allmusic_server_fabric_1_21"
239239
path: build/libs/
240+
build_fabric_1_21_4:
241+
runs-on: windows-latest
242+
permissions:
243+
contents: read
244+
steps:
245+
- uses: actions/checkout@v4
246+
- name: Set up JDK 21
247+
uses: actions/setup-java@v4
248+
with:
249+
java-version: '21'
250+
distribution: 'temurin'
251+
- name: Setup Gradle
252+
uses: gradle/actions/setup-gradle@v3 # v3.1.0
253+
- name: build
254+
shell: cmd
255+
run: |
256+
link.cmd && cd fabric_1_21_4 && gradlew build
257+
- name: update
258+
uses: actions/upload-artifact@v4
259+
with:
260+
name: "allmusic_server_fabric_1_21_4"
261+
path: build/libs/
240262
build_forge_1_7_10:
241263
runs-on: windows-latest
242264
permissions:

fabric_1_21_4/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# gradle
2+
3+
.gradle/
4+
build/
5+
out/
6+
classes/
7+
8+
# eclipse
9+
10+
*.launch
11+
12+
# idea
13+
14+
.idea/
15+
*.iml
16+
*.ipr
17+
*.iws
18+
19+
# vscode
20+
21+
.settings/
22+
.vscode/
23+
bin/
24+
.classpath
25+
.project
26+
27+
# macos
28+
29+
*.DS_Store
30+
31+
# fabric
32+
33+
run/
34+
35+
# java
36+
37+
hs_err_*.log
38+
replay_*.log
39+
*.hprof
40+
*.jfr

fabric_1_21_4/build.gradle

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
plugins {
2+
id 'fabric-loom' version '1.9-SNAPSHOT'
3+
id 'maven-publish'
4+
id "org.jetbrains.kotlin.jvm" version "2.1.0"
5+
}
6+
7+
def getVersionFromFile() {
8+
def versionFile = file('../version')
9+
if (versionFile.exists()) {
10+
return versionFile.text.trim()
11+
} else {
12+
throw new GradleException("Version file not found: ${versionFile.absolutePath}")
13+
}
14+
}
15+
16+
version = getVersionFromFile()
17+
18+
group = project.maven_group
19+
20+
base {
21+
archivesName = project.archives_base_name
22+
}
23+
24+
repositories {
25+
// Add repositories to retrieve artifacts from in here.
26+
// You should only use this when depending on other mods because
27+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
28+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
29+
// for more information about repositories.
30+
}
31+
32+
dependencies {
33+
// To change the versions see the gradle.properties file
34+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
35+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
36+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
37+
38+
// Fabric API. This is technically optional, but you probably want it anyway.
39+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
40+
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
41+
42+
include modImplementation('com.squareup.okio:okio-jvm:3.6.0')
43+
include modImplementation('com.squareup.okhttp3:okhttp:4.12.0')
44+
include modImplementation('org.xerial:sqlite-jdbc:3.48.0.0')
45+
}
46+
47+
processResources {
48+
inputs.property "version", project.version
49+
50+
filesMatching("fabric.mod.json") {
51+
expand "version": project.version
52+
}
53+
}
54+
55+
tasks.withType(JavaCompile).configureEach {
56+
it.options.release = 21
57+
}
58+
59+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
60+
kotlinOptions {
61+
jvmTarget = 21
62+
}
63+
}
64+
65+
java {
66+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
67+
// if it is present.
68+
// If you remove this line, sources will not be generated.
69+
withSourcesJar()
70+
71+
sourceCompatibility = JavaVersion.VERSION_21
72+
targetCompatibility = JavaVersion.VERSION_21
73+
}
74+
75+
jar {
76+
from("LICENSE") {
77+
rename { "${it}_${project.base.archivesName.get()}"}
78+
}
79+
}
80+
81+
// configure the maven publication
82+
publishing {
83+
publications {
84+
create("mavenJava", MavenPublication) {
85+
artifactId = project.archives_base_name
86+
from components.java
87+
}
88+
}
89+
90+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
91+
repositories {
92+
// Add repositories to publish to here.
93+
// Notice: This block does NOT have the same function as the block in the top level.
94+
// The repositories here will be used for publishing your artifact, not for
95+
// retrieving dependencies.
96+
}
97+
}

fabric_1_21_4/gradle.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx1G
3+
org.gradle.parallel=true
4+
5+
# Fabric Properties
6+
# check these on https://fabricmc.net/develop
7+
minecraft_version=1.21.4
8+
yarn_mappings=1.21.4+build.8
9+
loader_version=0.16.10
10+
fabric_kotlin_version=1.13.0+kotlin.2.1.0
11+
12+
# Mod Properties
13+
maven_group = com.coloryr.allmusic.server
14+
archives_base_name =[fabric-1.21.4]AllMusic_Server
15+
16+
# Dependencies
17+
fabric_version=0.115.0+1.21.4
60.2 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.11-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)