Skip to content

Commit 474f48a

Browse files
committed
up
1 parent 8396224 commit 474f48a

File tree

25 files changed

+1060
-4
lines changed

25 files changed

+1060
-4
lines changed

.github/workflows/gradle.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,28 @@ jobs:
259259
with:
260260
name: "allmusic_server_fabric_1_21_4"
261261
path: build/libs/
262+
build_fabric_1_21_5:
263+
runs-on: windows-latest
264+
permissions:
265+
contents: read
266+
steps:
267+
- uses: actions/checkout@v4
268+
- name: Set up JDK 21
269+
uses: actions/setup-java@v4
270+
with:
271+
java-version: '21'
272+
distribution: 'temurin'
273+
- name: Setup Gradle
274+
uses: gradle/actions/setup-gradle@v3 # v3.1.0
275+
- name: build
276+
shell: cmd
277+
run: |
278+
link.cmd && cd fabric_1_21_5 && gradlew build
279+
- name: update
280+
uses: actions/upload-artifact@v4
281+
with:
282+
name: "allmusic_server_fabric_1_21_5"
283+
path: build/libs/
262284
build_forge_1_7_10:
263285
runs-on: windows-latest
264286
permissions:

fabric_1_21_5/.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_5/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.10-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_5/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.5
8+
yarn_mappings=1.21.5+build.1
9+
loader_version=0.16.13
10+
fabric_kotlin_version=1.13.2+kotlin.2.1.20
11+
12+
# Mod Properties
13+
maven_group = com.coloryr.allmusic.server
14+
archives_base_name =[fabric-1.21.5]AllMusic_Server
15+
16+
# Dependencies
17+
fabric_version=0.120.0+1.21.5
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.12.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)