Compare commits

..

No commits in common. "98b52d394f56801a06a0e32cfa8e8bc681c5f550" and "a0a5f6cf2f6d87f4f29e551f3676e58edaadbd3a" have entirely different histories.

16 changed files with 48 additions and 50 deletions

View file

@ -18,6 +18,6 @@ jobs:
- name: Build - name: Build
run: | run: |
chmod +x ./gradlew chmod +x ./gradlew
./gradlew publishMavenJavaPublicationToFrogMCSnapshotsMavenRepository \ ./gradlew publishMavenJavaPublicationToEsnesnonSnapshotsMavenRepository \
-PFrogMCSnapshotsMavenUsername=${{ secrets.MAVEN_PUSH_USER }} \ -PEsnesnonSnapshotsMavenUsername=${{ secrets.MAVEN_PUSH_USER }} \
-PFrogMCSnapshotsMavenPassword=${{ secrets.MAVEN_PUSH_TOKEN }} -PEsnesnonSnapshotsMavenPassword=${{ secrets.MAVEN_PUSH_TOKEN }}

View file

@ -5,7 +5,7 @@ plugins {
`maven-publish` `maven-publish`
} }
group = "dev.frogmc" group = "org.ecorous.esnesnon"
version = "1.0.0-SNAPSHOT" version = "1.0.0-SNAPSHOT"
repositories { repositories {
@ -32,8 +32,8 @@ publishing {
repositories { repositories {
maven { maven {
name = "FrogMCSnapshotsMaven" name = "EsnesnonSnapshotsMaven"
url = uri("https://maven.frogmc.dev/snapshots") url = uri("https://maven-esnesnon.ecorous.org/snapshots")
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)
authentication { authentication {
create<BasicAuthentication>("basic") create<BasicAuthentication>("basic")
@ -41,8 +41,8 @@ publishing {
} }
maven { maven {
name = "FrogMCReleasesMaven" name = "EsnesnonReleasesMaven"
url = uri("https://maven.frogmc.dev/releases") url = uri("https://maven-esnesnon.ecorous.org/releases")
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)
authentication { authentication {
create<BasicAuthentication>("basic") create<BasicAuthentication>("basic")

View file

@ -1,5 +1,5 @@
#Sat Apr 27 20:33:54 CEST 2024 #Sat Apr 27 20:33:54 CEST 2024
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View file

@ -1,2 +1,2 @@
rootProject.name = "thyroxine" rootProject.name = "nonsense-remapper"

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine; package org.ecorous.esnesnon.nonsense_remapper;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine; package org.ecorous.esnesnon.nonsense_remapper;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import lombok.experimental.UtilityClass; import lombok.experimental.UtilityClass;
@ -12,7 +12,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import static dev.frogmc.thyroxine.Constants.GSON; import static org.ecorous.esnesnon.nonsense_remapper.Constants.GSON;
@UtilityClass @UtilityClass
public class HttpHelper { public class HttpHelper {

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine; package org.ecorous.esnesnon.nonsense_remapper;
import java.io.IOException; import java.io.IOException;
import java.nio.file.*; import java.nio.file.*;
@ -9,20 +9,20 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import dev.frogmc.thyroxine.api.ParameterClassRemapper; import org.ecorous.esnesnon.nonsense_remapper.api.Mapper;
import dev.frogmc.thyroxine.parser.ProguardParser; import org.ecorous.esnesnon.nonsense_remapper.api.ParameterClassRemapper;
import dev.frogmc.thyroxine.provider.MojmapProvider; import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData;
import dev.frogmc.thyroxine.provider.ParchmentProvider; import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment;
import dev.frogmc.thyroxine.api.Mapper; import org.ecorous.esnesnon.nonsense_remapper.parser.ProguardParser;
import dev.frogmc.thyroxine.api.data.MappingData; import org.ecorous.esnesnon.nonsense_remapper.provider.MojmapProvider;
import dev.frogmc.thyroxine.api.data.Parchment; import org.ecorous.esnesnon.nonsense_remapper.provider.ParchmentProvider;
import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter; import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes; import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.ClassRemapper; import org.objectweb.asm.commons.ClassRemapper;
public class Thyroxine { public class NonsenseRemapper {
public static void run(String minecraftVersion, Path inputJar, Path outputJar, boolean skipMetaInf, boolean renameParameters) throws IOException, InterruptedException { public static void run(String minecraftVersion, Path inputJar, Path outputJar, boolean skipMetaInf, boolean renameParameters) throws IOException, InterruptedException {
MappingData data = ProguardParser.read(MojmapProvider.get(minecraftVersion, MappingData data = ProguardParser.read(MojmapProvider.get(minecraftVersion,
@ -50,21 +50,19 @@ public class Thyroxine {
Map<String, List<String>> lazyParents = new ConcurrentHashMap<>(); Map<String, List<String>> lazyParents = new ConcurrentHashMap<>();
Mapper mapper = new Mapper(data, className -> lazyParents.computeIfAbsent(className, ignored -> Mapper mapper = new Mapper(data, className -> lazyParents.computeIfAbsent(className, ignored ->
Thyroxine.computeInheritances(className, inFs))); NonsenseRemapper.computeInheritances(className, inFs)));
Files.walkFileTree(inFs.getPath("/"), new SimpleFileVisitor<>() { Files.walkFileTree(inFs.getPath("/"), new SimpleFileVisitor<>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
if (skipMetaInf && dir.startsWith("/META-INF")) {
return FileVisitResult.SKIP_SUBTREE;
}
return FileVisitResult.CONTINUE;
}
@Override @Override
public FileVisitResult visitFile(Path path, BasicFileAttributes basicFileAttributes) { public FileVisitResult visitFile(Path path, BasicFileAttributes basicFileAttributes) {
if (skipMetaInf) {
if (path.startsWith("/META-INF")) {
var name = path.getFileName().toString();
if (name.endsWith(".MF") || name.endsWith(".SF") || name.endsWith(".RSA")) {
return FileVisitResult.CONTINUE;
}
}
}
tasks.add(() -> { tasks.add(() -> {
try { try {
if (path.getFileName().toString().endsWith(".class")) { if (path.getFileName().toString().endsWith(".class")) {

View file

@ -1,7 +1,7 @@
package dev.frogmc.thyroxine.api; package org.ecorous.esnesnon.nonsense_remapper.api;
import dev.frogmc.thyroxine.api.data.MappingData; import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData;
import dev.frogmc.thyroxine.api.data.Member; import org.ecorous.esnesnon.nonsense_remapper.api.data.Member;
import org.objectweb.asm.commons.Remapper; import org.objectweb.asm.commons.Remapper;
import java.util.List; import java.util.List;

View file

@ -1,6 +1,6 @@
package dev.frogmc.thyroxine.api; package org.ecorous.esnesnon.nonsense_remapper.api;
import dev.frogmc.thyroxine.api.data.Parchment; import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment;
import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes; import org.objectweb.asm.Opcodes;

View file

@ -1,11 +1,11 @@
package dev.frogmc.thyroxine.api; package org.ecorous.esnesnon.nonsense_remapper.api;
import java.util.HashSet; import java.util.HashSet;
import java.util.Locale; import java.util.Locale;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import dev.frogmc.thyroxine.api.data.Parchment; import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment;
import org.objectweb.asm.Label; import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes; import org.objectweb.asm.Opcodes;

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine.api.data; package org.ecorous.esnesnon.nonsense_remapper.api.data;
import org.objectweb.asm.Type; import org.objectweb.asm.Type;

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine.api.data; package org.ecorous.esnesnon.nonsense_remapper.api.data;
public record Member(String owner, String name, String descriptor) { public record Member(String owner, String name, String descriptor) {
} }

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine.api.data; package org.ecorous.esnesnon.nonsense_remapper.api.data;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;

View file

@ -1,7 +1,7 @@
package dev.frogmc.thyroxine.parser; package org.ecorous.esnesnon.nonsense_remapper.parser;
import dev.frogmc.thyroxine.api.data.MappingData; import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData;
import dev.frogmc.thyroxine.api.data.Member; import org.ecorous.esnesnon.nonsense_remapper.api.data.Member;
public class ProguardParser { public class ProguardParser {

View file

@ -1,8 +1,8 @@
package dev.frogmc.thyroxine.provider; package org.ecorous.esnesnon.nonsense_remapper.provider;
import com.google.gson.*; import com.google.gson.*;
import dev.frogmc.thyroxine.Constants; import org.ecorous.esnesnon.nonsense_remapper.Constants;
import dev.frogmc.thyroxine.HttpHelper; import org.ecorous.esnesnon.nonsense_remapper.HttpHelper;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;

View file

@ -1,4 +1,4 @@
package dev.frogmc.thyroxine.provider; package org.ecorous.esnesnon.nonsense_remapper.provider;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
@ -16,7 +16,7 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import com.google.gson.Gson; import com.google.gson.Gson;
import dev.frogmc.thyroxine.api.data.Parchment; import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;