Compare commits
No commits in common. "98b52d394f56801a06a0e32cfa8e8bc681c5f550" and "a0a5f6cf2f6d87f4f29e551f3676e58edaadbd3a" have entirely different histories.
98b52d394f
...
a0a5f6cf2f
|
@ -18,6 +18,6 @@ jobs:
|
|||
- name: Build
|
||||
run: |
|
||||
chmod +x ./gradlew
|
||||
./gradlew publishMavenJavaPublicationToFrogMCSnapshotsMavenRepository \
|
||||
-PFrogMCSnapshotsMavenUsername=${{ secrets.MAVEN_PUSH_USER }} \
|
||||
-PFrogMCSnapshotsMavenPassword=${{ secrets.MAVEN_PUSH_TOKEN }}
|
||||
./gradlew publishMavenJavaPublicationToEsnesnonSnapshotsMavenRepository \
|
||||
-PEsnesnonSnapshotsMavenUsername=${{ secrets.MAVEN_PUSH_USER }} \
|
||||
-PEsnesnonSnapshotsMavenPassword=${{ secrets.MAVEN_PUSH_TOKEN }}
|
||||
|
|
|
@ -5,7 +5,7 @@ plugins {
|
|||
`maven-publish`
|
||||
}
|
||||
|
||||
group = "dev.frogmc"
|
||||
group = "org.ecorous.esnesnon"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
|
@ -32,8 +32,8 @@ publishing {
|
|||
|
||||
repositories {
|
||||
maven {
|
||||
name = "FrogMCSnapshotsMaven"
|
||||
url = uri("https://maven.frogmc.dev/snapshots")
|
||||
name = "EsnesnonSnapshotsMaven"
|
||||
url = uri("https://maven-esnesnon.ecorous.org/snapshots")
|
||||
credentials(PasswordCredentials::class)
|
||||
authentication {
|
||||
create<BasicAuthentication>("basic")
|
||||
|
@ -41,8 +41,8 @@ publishing {
|
|||
}
|
||||
|
||||
maven {
|
||||
name = "FrogMCReleasesMaven"
|
||||
url = uri("https://maven.frogmc.dev/releases")
|
||||
name = "EsnesnonReleasesMaven"
|
||||
url = uri("https://maven-esnesnon.ecorous.org/releases")
|
||||
credentials(PasswordCredentials::class)
|
||||
authentication {
|
||||
create<BasicAuthentication>("basic")
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
#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
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
rootProject.name = "thyroxine"
|
||||
rootProject.name = "nonsense-remapper"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package dev.frogmc.thyroxine;
|
||||
package org.ecorous.esnesnon.nonsense_remapper;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package dev.frogmc.thyroxine;
|
||||
package org.ecorous.esnesnon.nonsense_remapper;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
@ -12,7 +12,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import static dev.frogmc.thyroxine.Constants.GSON;
|
||||
import static org.ecorous.esnesnon.nonsense_remapper.Constants.GSON;
|
||||
|
||||
@UtilityClass
|
||||
public class HttpHelper {
|
|
@ -1,4 +1,4 @@
|
|||
package dev.frogmc.thyroxine;
|
||||
package org.ecorous.esnesnon.nonsense_remapper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.*;
|
||||
|
@ -9,20 +9,20 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import dev.frogmc.thyroxine.api.ParameterClassRemapper;
|
||||
import dev.frogmc.thyroxine.parser.ProguardParser;
|
||||
import dev.frogmc.thyroxine.provider.MojmapProvider;
|
||||
import dev.frogmc.thyroxine.provider.ParchmentProvider;
|
||||
import dev.frogmc.thyroxine.api.Mapper;
|
||||
import dev.frogmc.thyroxine.api.data.MappingData;
|
||||
import dev.frogmc.thyroxine.api.data.Parchment;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.Mapper;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.ParameterClassRemapper;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.parser.ProguardParser;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.provider.MojmapProvider;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.provider.ParchmentProvider;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
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 {
|
||||
MappingData data = ProguardParser.read(MojmapProvider.get(minecraftVersion,
|
||||
|
@ -50,21 +50,19 @@ public class Thyroxine {
|
|||
|
||||
Map<String, List<String>> lazyParents = new ConcurrentHashMap<>();
|
||||
Mapper mapper = new Mapper(data, className -> lazyParents.computeIfAbsent(className, ignored ->
|
||||
Thyroxine.computeInheritances(className, inFs)));
|
||||
NonsenseRemapper.computeInheritances(className, inFs)));
|
||||
|
||||
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
|
||||
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(() -> {
|
||||
try {
|
||||
if (path.getFileName().toString().endsWith(".class")) {
|
|
@ -1,7 +1,7 @@
|
|||
package dev.frogmc.thyroxine.api;
|
||||
package org.ecorous.esnesnon.nonsense_remapper.api;
|
||||
|
||||
import dev.frogmc.thyroxine.api.data.MappingData;
|
||||
import dev.frogmc.thyroxine.api.data.Member;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.data.Member;
|
||||
import org.objectweb.asm.commons.Remapper;
|
||||
|
||||
import java.util.List;
|
|
@ -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.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
|
@ -1,11 +1,11 @@
|
|||
package dev.frogmc.thyroxine.api;
|
||||
package org.ecorous.esnesnon.nonsense_remapper.api;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
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.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
|
@ -1,4 +1,4 @@
|
|||
package dev.frogmc.thyroxine.api.data;
|
||||
package org.ecorous.esnesnon.nonsense_remapper.api.data;
|
||||
|
||||
import org.objectweb.asm.Type;
|
||||
|
|
@ -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) {
|
||||
}
|
|
@ -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.Optional;
|
|
@ -1,7 +1,7 @@
|
|||
package dev.frogmc.thyroxine.parser;
|
||||
package org.ecorous.esnesnon.nonsense_remapper.parser;
|
||||
|
||||
import dev.frogmc.thyroxine.api.data.MappingData;
|
||||
import dev.frogmc.thyroxine.api.data.Member;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.api.data.Member;
|
||||
|
||||
public class ProguardParser {
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package dev.frogmc.thyroxine.provider;
|
||||
package org.ecorous.esnesnon.nonsense_remapper.provider;
|
||||
|
||||
import com.google.gson.*;
|
||||
import dev.frogmc.thyroxine.Constants;
|
||||
import dev.frogmc.thyroxine.HttpHelper;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.Constants;
|
||||
import org.ecorous.esnesnon.nonsense_remapper.HttpHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
|
@ -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.ParserConfigurationException;
|
||||
|
@ -16,7 +16,7 @@ import java.security.MessageDigest;
|
|||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
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.xml.sax.SAXException;
|
||||
|
Loading…
Reference in a new issue