Skip to content

Commit

Permalink
Downgrade ART
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Feb 2, 2025
1 parent fcb80c8 commit 6f94a19
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ dependencies {
implementation "net.dv8tion:JDA:5.2.3"
implementation 'pw.chew:jda-chewtils:2.0'

implementation 'net.neoforged:AutoRenamingTool:2.0.8'
// we can't bump this because of https://github.com/neoforged/AutoRenamingTool/pull/13
implementation 'net.neoforged:AutoRenamingTool:2.0.3'
implementation 'net.neoforged.installertools:binarypatcher:2.1.2'

implementation 'io.github.matyrobbrt:curseforgeapi:2.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public void runWithExceptions() {
var scanned = indexer.index(platform, VIRTUAL_THREAD_EXECUTOR, CONCURRENCY, monitor, sanitizer);

for (ModIndexer.IndexCandidate indexCandidate : scanned) {
indexCandidate.file().close();
// Only manually close platform files as they'll propagate the close call to their nested jars in the correct order
if (indexCandidate.platformFile() != null) {
indexCandidate.file().close();
}
}

listener.markFinish(scanned.size());
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/net/neoforged/waifu/util/NeoForgeJarProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,17 @@ public static List<ModFileInfo> provide(String neoVersion) throws IOException {
"--write-result=node.stripClient.output.output:" + stripClientJar.toAbsolutePath(),
"--write-result=node.downloadClient.output.output:" + rawJar.toAbsolutePath());

Renamer.builder()
var renamer = Renamer.builder()
.logger(s -> {})
.map(mappings.toFile())
.add(Transformer.parameterAnnotationFixerFactory())
.add(Transformer.parameterAnnotationFixerFactory());

renamer = renamer
.add(Transformer.recordFixerFactory())
.add(Transformer.identifierFixerFactory(IdentifierFixerConfig.ALL))
.add(Transformer.sourceFixerFactory(SourceFixerConfig.JAVA))
.build()
.add(Transformer.sourceFixerFactory(SourceFixerConfig.JAVA));

renamer.build()
.run(stripClientJar.toFile(), mcJarSlim.toFile());

merge(neoformMcJar, rawJar, mcJarSlim, mcVersion);
Expand Down

0 comments on commit 6f94a19

Please sign in to comment.