Skip to content

Commit ff429c3

Browse files
committed
up
1 parent 474f48a commit ff429c3

File tree

24 files changed

+1285
-4
lines changed

24 files changed

+1285
-4
lines changed

.github/workflows/gradle.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,4 +500,26 @@ jobs:
500500
uses: actions/upload-artifact@v4
501501
with:
502502
name: "allmusic_server_neoforge_1_21_4"
503+
path: build/libs/
504+
build_neoforge_1_21_5:
505+
runs-on: windows-latest
506+
permissions:
507+
contents: read
508+
steps:
509+
- uses: actions/checkout@v4
510+
- name: Set up JDK 21
511+
uses: actions/setup-java@v4
512+
with:
513+
java-version: '21'
514+
distribution: 'temurin'
515+
- name: Setup Gradle
516+
uses: gradle/actions/setup-gradle@v3 # v3.1.0
517+
- name: build
518+
shell: cmd
519+
run: |
520+
link.cmd && cd neoforge_1_21_5 && gradlew build
521+
- name: update
522+
uses: actions/upload-artifact@v4
523+
with:
524+
name: "allmusic_server_neoforge_1_21_5"
503525
path: build/libs/

link.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set array=folia server_top server forge_1_20 ^
99
forge_1_19_2 forge_1_18_2 forge_1_16_5 forge_1_12_2 forge_1_7_10 ^
1010
fabric_1_20_2 fabric_1_20 fabric_1_19_3 fabric_1_19_2 fabric_1_18_2 ^
1111
fabric_1_16_5 fabric_1_20_6 fabric_1_21 neoforge_1_20_4 neoforge_1_20_5 neoforge_1_21 ^
12-
neoforge_1_21_4 fabric_1_21_4 fabric_1_21_5
12+
neoforge_1_21_4 fabric_1_21_4 fabric_1_21_5 neoforge_1_21_5
1313

1414
for %%i in (%array%) do (
1515
if not exist "%%i\src\main\java\com\coloryr\allmusic\server\core" mklink /j "%%i\src\main\java\com\coloryr\allmusic\server\core" "core"
@@ -21,7 +21,7 @@ set array1=folia server_top forge_1_20 ^
2121
forge_1_19_2 forge_1_18_2 forge_1_16_5 forge_1_12_2 forge_1_7_10 ^
2222
fabric_1_20_2 fabric_1_20 fabric_1_19_3 fabric_1_19_2 fabric_1_18_2 ^
2323
fabric_1_16_5 fabric_1_20_6 fabric_1_21 neoforge_1_20_4 neoforge_1_20_5 neoforge_1_21 ^
24-
neoforge_1_21_4 fabric_1_21_4 fabric_1_21_5
24+
neoforge_1_21_4 fabric_1_21_4 fabric_1_21_5 neoforge_1_21_5
2525

2626
for %%i in (%array1%) do (
2727
if not exist "%%i\src\main\java\com\coloryr\allmusic\server\codec" mklink /j "%%i\src\main\java\com\coloryr\allmusic\server\codec" "codec"

neoforge_1_21_5/.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable autocrlf on generated files, they always generate with LF
2+
# Add any extra files or paths here to make git stop saying they
3+
# are changed when only line endings change.
4+
src/generated/**/.cache/cache text eol=lf
5+
src/generated/**/*.json text eol=lf

neoforge_1_21_5/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# eclipse
2+
bin
3+
*.launch
4+
.settings
5+
.metadata
6+
.classpath
7+
.project
8+
9+
# idea
10+
out
11+
*.ipr
12+
*.iws
13+
*.iml
14+
.idea
15+
16+
# gradle
17+
build
18+
.gradle
19+
20+
# other
21+
eclipse
22+
run
23+
runs
24+
25+
# Files from Forge MDK
26+
forge*changelog.txt

neoforge_1_21_5/build.gradle

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
plugins {
2+
id 'java-library'
3+
id 'maven-publish'
4+
id 'net.neoforged.gradle.userdev' version '7.0.184'
5+
}
6+
7+
tasks.named('wrapper', Wrapper).configure {
8+
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
9+
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
10+
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
11+
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
12+
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
13+
distributionType = Wrapper.DistributionType.BIN
14+
}
15+
16+
def getVersionFromFile() {
17+
def versionFile = file('../version')
18+
if (versionFile.exists()) {
19+
return versionFile.text.trim()
20+
} else {
21+
throw new GradleException("Version file not found: ${versionFile.absolutePath}")
22+
}
23+
}
24+
25+
version = getVersionFromFile()
26+
mod_version = version
27+
group = mod_group_id
28+
29+
repositories {
30+
mavenLocal()
31+
32+
// maven {
33+
// name = 'Kotlin for Forge'
34+
// url = 'https://thedarkcolour.github.io/KotlinForForge/'
35+
// content { includeGroup "thedarkcolour" }
36+
// }
37+
}
38+
39+
base {
40+
archivesName = file_name
41+
}
42+
43+
// Mojang ships Java 21 to end users starting in 1.20.5, so mods should target Java 21.
44+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
45+
46+
// Enable the Jar-in-Jar system for your mod
47+
jarJar.enable()
48+
49+
// Default run configurations.
50+
// These can be tweaked, removed, or duplicated as needed.
51+
runs {
52+
// applies to all the run configs below
53+
configureEach {
54+
// Recommended logging data for a userdev environment
55+
// The markers can be added/remove as needed separated by commas.
56+
// "SCAN": For mods scan.
57+
// "REGISTRIES": For firing of registry events.
58+
// "REGISTRYDUMP": For getting the contents of all registries.
59+
systemProperty 'forge.logging.markers', 'REGISTRIES'
60+
61+
// Recommended logging level for the console
62+
// You can set various levels here.
63+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
64+
systemProperty 'forge.logging.console.level', 'debug'
65+
66+
modSource project.sourceSets.main
67+
}
68+
69+
client {
70+
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
71+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
72+
}
73+
74+
server {
75+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
76+
argument '--nogui'
77+
}
78+
79+
// This run config launches GameTestServer and runs all registered gametests, then exits.
80+
// By default, the server will crash when no gametests are provided.
81+
// The gametest system is also enabled by default for other run configs under the /test command.
82+
gameTestServer {
83+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
84+
}
85+
86+
clientData {
87+
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
88+
// workingDirectory project.file('run-data')
89+
90+
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
91+
arguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
92+
}
93+
}
94+
95+
// Include resources generated by data generators.
96+
sourceSets.main.resources { srcDir 'src/generated/resources' }
97+
98+
// Sets up a dependency configuration called 'localRuntime'.
99+
// This configuration should be used instead of 'runtimeOnly' to declare
100+
// a dependency that will be present for runtime testing but that is
101+
// "optional", meaning it will not be pulled by dependents of this mod.
102+
configurations {
103+
runtimeClasspath.extendsFrom localRuntime
104+
}
105+
106+
dependencies {
107+
// Specify the version of Minecraft to use.
108+
// Depending on the plugin applied there are several options. We will assume you applied the userdev plugin as shown above.
109+
// The group for userdev is net.neoforged, the module name is neoforge, and the version is the same as the neoforge version.
110+
// You can however also use the vanilla plugin (net.neoforged.gradle.vanilla) to use a version of Minecraft without the neoforge loader.
111+
// And its provides the option to then use net.minecraft as the group, and one of; client, server or joined as the module name, plus the game version as version.
112+
// For all intends and purposes: You can treat this dependency as if it is a normal library you would use.
113+
implementation "net.neoforged:neoforge:${neo_version}"
114+
115+
// Example optional mod dependency with JEI
116+
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
117+
// compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
118+
// compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}"
119+
// We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it
120+
// localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"
121+
122+
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
123+
implementation 'org.xerial:sqlite-jdbc:3.48.0.0'
124+
// implementation "thedarkcolour:kotlinforforge:$kff_version"
125+
126+
// jarJar (group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: '[2.0, 2.1)')
127+
// jarJar (group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk7', version: '[2.0, 2.1)')
128+
// jarJar (group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '[2.0, 2.1)')
129+
// jarJar (group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-common', version: '[2.0, 2.1)')
130+
jarJar (group: 'com.squareup.okhttp3', name: 'okhttp', version: '[4.12, 5.0)')
131+
jarJar (group: 'com.squareup.okio', name: 'okio-jvm', version: '[3.9, 4.0)')
132+
jarJar (group: 'org.xerial', name: 'sqlite-jdbc', version: '[3.46, 4.0)')
133+
134+
// Example mod dependency using a mod jar from ./libs with a flat dir repository
135+
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
136+
// The group id is ignored when searching -- in this case, it is "blank"
137+
// implementation "blank:coolmod-${mc_version}:${coolmod_version}"
138+
139+
// Example mod dependency using a file as dependency
140+
// implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar")
141+
142+
// Example project dependency using a sister or child project:
143+
// implementation project(":myproject")
144+
145+
// For more info:
146+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
147+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
148+
}
149+
150+
// This block of code expands all declared replace properties in the specified resource targets.
151+
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
152+
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
153+
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
154+
tasks.withType(ProcessResources).configureEach {
155+
var replaceProperties = [
156+
minecraft_version : minecraft_version,
157+
minecraft_version_range: minecraft_version_range,
158+
neo_version : neo_version,
159+
neo_version_range : neo_version_range,
160+
loader_version_range : loader_version_range,
161+
mod_id : mod_id,
162+
mod_name : mod_name,
163+
mod_license : mod_license,
164+
mod_version : mod_version,
165+
mod_authors : mod_authors,
166+
mod_description : mod_description
167+
]
168+
inputs.properties replaceProperties
169+
170+
filesMatching(['META-INF/neoforge.mods.toml']) {
171+
expand replaceProperties
172+
}
173+
}
174+
175+
// Example configuration to allow publishing using the maven-publish plugin
176+
publishing {
177+
publications {
178+
register('mavenJava', MavenPublication) {
179+
from components.java
180+
}
181+
}
182+
repositories {
183+
maven {
184+
url "file://${project.projectDir}/repo"
185+
}
186+
}
187+
}
188+
189+
tasks.withType(JavaCompile).configureEach {
190+
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
191+
}
192+
193+
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
194+
idea {
195+
module {
196+
downloadSources = true
197+
downloadJavadoc = true
198+
}
199+
}

neoforge_1_21_5/gradle.properties

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2+
org.gradle.jvmargs=-Xmx1G
3+
org.gradle.daemon=true
4+
org.gradle.parallel=true
5+
org.gradle.caching=true
6+
org.gradle.configuration-cache=true
7+
8+
#read more on this at https://github.com/neoforged/ModDevGradle?tab=readme-ov-file#better-minecraft-parameter-names--javadoc-parchment
9+
# you can also find the latest versions at: https://parchmentmc.org/docs/getting-started
10+
parchment_minecraft_version=1.21.4
11+
parchment_mappings_version=2025.03.23
12+
# Environment Properties
13+
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
14+
# The Minecraft version must agree with the Neo version to get a valid artifact
15+
minecraft_version=1.21.5
16+
# The Minecraft version range can use any release version of Minecraft as bounds.
17+
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
18+
# as they do not follow standard versioning conventions.
19+
minecraft_version_range=[1.21.5]
20+
# The Neo version must agree with the Minecraft version to get a valid artifact
21+
neo_version=21.5.42-beta
22+
# The Neo version range can use any version of Neo as bounds
23+
neo_version_range=[21.5.42-beta,)
24+
# The loader version range can only use the major version of FML as bounds
25+
loader_version_range=[1,)
26+
27+
kff_version=5.7.0
28+
29+
## Mod Properties
30+
31+
file_name = [neoforge-1.21.5]AllMusic_Server
32+
33+
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
34+
# Must match the String constant located in the main mod class annotated with @Mod.
35+
mod_id=allmusic_server
36+
# The human-readable display name for the mod.
37+
mod_name=AllMusic Server
38+
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
39+
mod_license=GPL-3.0
40+
# The mod version. See https://semver.org/
41+
mod_version=3.3.2
42+
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
43+
# This should match the base package used for the mod sources.
44+
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
45+
mod_group_id=com.coloryr.allmusic.server
46+
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
47+
mod_authors=Color_yr
48+
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
49+
mod_description=AllMusic Server Mod
59.3 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-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)