Skip to content

Commit dfae8ee

Browse files
committed
Port to 1.21
1 parent 063e239 commit dfae8ee

27 files changed

+549
-508
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Thumbs.db
77

88
## ForgeGradle
99
/run
10+
/runs
1011

1112
## eclipse
1213
/.settings

build.gradle

+33-59
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,65 @@
11
plugins {
2+
id 'java-library'
23
id 'eclipse'
4+
id 'idea'
35
id 'maven-publish'
46
id 'pmd'
5-
id 'com.diffplug.spotless' version '5.12.5'
6-
id 'net.minecraftforge.gradle' version '5.1.+'
7-
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
8-
id 'org.spongepowered.mixin' version '0.7.+'
7+
id 'com.diffplug.spotless' version '6.25.0'
8+
id 'net.neoforged.gradle.userdev' version '7.0.165'
99
}
1010

1111
ext.configFile = file('build.properties')
1212
ext.config = parseConfig(configFile)
1313

1414
version = "${config.version}-${config.build_number}"
1515
group = "vazkii.${config.mod_id}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
16-
archivesBaseName = config.mod_name
16+
base {
17+
archivesName = config.mod_name
18+
}
1719

18-
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
20+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
1921

2022
compileJava.options.compilerArgs << "-Xlint:all,-classfile,-processing,-deprecation" << "-Werror"
2123

2224
if (System.getenv('BUILD_NUMBER') != null) {
2325
version += "." + System.getenv('BUILD_NUMBER')
2426
}
2527

26-
minecraft {
27-
// The mappings can be changed at any time, and must be in the following format.
28-
// snapshot_YYYYMMDD Snapshot are built nightly.
29-
// stable_# Stables are built at the discretion of the MCP team.
30-
// Use non-default mappings at your own risk. they may not always work.
31-
// Simply re-run your setup task after changing the mappings to update your workspace.
32-
33-
mappings channel: "${config.mapping_channel}", version: "${config.mapping_version}"
34-
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
35-
36-
// Default run configurations.
37-
// These can be tweaked, removed, or duplicated as needed.
38-
runs {
39-
client {
40-
workingDirectory project.file('run')
41-
42-
// Recommended logging data for a userdev environment
43-
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
44-
45-
// Recommended logging level for the console
46-
property 'forge.logging.console.level', 'debug'
47-
48-
mods {
49-
akashictome {
50-
source sourceSets.main
51-
}
52-
}
53-
}
28+
runs {
29+
// applies to all the run configs below
30+
configureEach {
31+
// Recommended logging data for a userdev environment
32+
systemProperty 'forge.logging.markers', 'REGISTRIES'
5433

55-
server {
56-
workingDirectory project.file('run')
34+
// Recommended logging level for the console
35+
systemProperty 'forge.logging.console.level', 'debug'
5736

58-
// Recommended logging data for a userdev environment
59-
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
37+
modSource project.sourceSets.main
38+
}
6039

61-
// Recommended logging level for the console
62-
property 'forge.logging.console.level', 'debug'
40+
client {
41+
}
6342

64-
mods {
65-
akashictome {
66-
source sourceSets.main
67-
}
68-
}
69-
}
43+
server {
44+
programArgument '--nogui'
7045
}
7146
}
7247

7348
repositories {
7449
maven {
7550
url "https://cursemaven.com"
51+
content {
52+
includeGroup "curse.maven"
53+
}
7654
}
7755
}
7856

7957
dependencies {
80-
minecraft "net.minecraftforge:forge:${config.mc_version}-${config.forge_version}"
81-
implementation fg.deobf("curse.maven:curios-309927:5367944")
82-
implementation fg.deobf("curse.maven:patchouli-306770:4966125")
83-
implementation fg.deobf("curse.maven:botania-225643:5594997")
58+
implementation "net.neoforged:neoforge:${config.neo_version}"
59+
60+
implementation "curse.maven:curios-1037991:5765721"
61+
implementation "curse.maven:patchouli-306770:5683901"
62+
// implementation "curse.maven:botania-225643:5594997"
8463
}
8564

8665
spotless {
@@ -96,11 +75,9 @@ spotless {
9675
}
9776

9877
pmd {
99-
toolVersion '6.22.0'
100-
// no way around this warning unless we upgrade Gradle, apparently
101-
//incrementalAnalysis.set(true)
102-
ruleSets.clear()
103-
ruleSetFiles = files("spotless/pmd-ruleset.xml")
78+
toolVersion '6.35.0'
79+
incrementalAnalysis.set(true)
80+
ruleSetFiles = rootProject.files("spotless/pmd-ruleset.xml")
10481
}
10582

10683
task checkSyntax (group: "verification") {
@@ -118,7 +95,7 @@ task incrementBuildNumber {
11895

11996
import java.util.regex.Pattern
12097
task sortArtifacts(type: Copy) {
121-
from jar.destinationDir
98+
from jar.destinationDirectory
12299
into config.dir_output
123100
//Put each jar with a classifier in a subfolder with the classifier as its name
124101
eachFile {
@@ -144,9 +121,6 @@ def parseConfig(File config) {
144121
}
145122

146123
jar {
147-
//rename the default output, for some better... sanity with scipts
148-
archiveName = "${baseName}-${version}.${extension}"
149-
150124
manifest {
151125
attributes([
152126
"Specification-Title": "${config.mod_id}",

build.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#Wed Aug 07 18:14:17 UTC 2024
22
mapping_channel=parchment
3-
forge_version=47.2.0
3+
neo_version=21.1.68
44
mod_id=akashictome
55
dir_repo=./
66
build_number=28
77
dir_output=../Build Output/AkashicTome/
88
mapping_version=2023.09.03-1.20.1
99
version=1.7
1010
mod_name=AkashicTome
11-
mc_version=1.20.1
11+
mc_version=1.21.1

gradle.properties

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
55
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
66
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
77
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
8+
9+
neogradle.subsystems.parchment.minecraftVersion=1.21
10+
neogradle.subsystems.parchment.mappingsVersion=2024.07.28
11+
neogradle.subsystems.conventions.runs.create-default-run-per-type=false

gradle/wrapper/gradle-wrapper.jar

-10.9 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
36
zipStoreBase=GRADLE_USER_HOME
47
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

0 commit comments

Comments
 (0)