Compare commits

..

4 commits

Author SHA1 Message Date
moehreag 98b52d394f update gradle wrapper
All checks were successful
Publish to snapshot maven / build (push) Successful in 18s
2024-06-07 15:17:43 +02:00
moehreag fbba141ba9 move to domain maven group 2024-06-02 21:11:10 +02:00
moehreag dfcad64308 move maven group 2024-06-02 15:59:25 +02:00
moehreag 1187039f90 rename project, fix handling multi-release jars 2024-05-28 01:51:56 +02:00
16 changed files with 50 additions and 48 deletions

View file

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

View file

@ -5,7 +5,7 @@ plugins {
`maven-publish` `maven-publish`
} }
group = "org.ecorous.esnesnon" group = "dev.frogmc"
version = "1.0.0-SNAPSHOT" version = "1.0.0-SNAPSHOT"
repositories { repositories {
@ -32,8 +32,8 @@ publishing {
repositories { repositories {
maven { maven {
name = "EsnesnonSnapshotsMaven" name = "FrogMCSnapshotsMaven"
url = uri("https://maven-esnesnon.ecorous.org/snapshots") url = uri("https://maven.frogmc.dev/snapshots")
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)
authentication { authentication {
create<BasicAuthentication>("basic") create<BasicAuthentication>("basic")
@ -41,8 +41,8 @@ publishing {
} }
maven { maven {
name = "EsnesnonReleasesMaven" name = "FrogMCReleasesMaven"
url = uri("https://maven-esnesnon.ecorous.org/releases") url = uri("https://maven.frogmc.dev/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.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-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 = "nonsense-remapper" rootProject.name = "thyroxine"

View file

@ -1,4 +1,4 @@
package org.ecorous.esnesnon.nonsense_remapper; package dev.frogmc.thyroxine;
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 org.ecorous.esnesnon.nonsense_remapper; package dev.frogmc.thyroxine;
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 org.ecorous.esnesnon.nonsense_remapper.Constants.GSON; import static dev.frogmc.thyroxine.Constants.GSON;
@UtilityClass @UtilityClass
public class HttpHelper { public class HttpHelper {

View file

@ -1,4 +1,4 @@
package org.ecorous.esnesnon.nonsense_remapper; package dev.frogmc.thyroxine;
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 org.ecorous.esnesnon.nonsense_remapper.api.Mapper; import dev.frogmc.thyroxine.api.ParameterClassRemapper;
import org.ecorous.esnesnon.nonsense_remapper.api.ParameterClassRemapper; import dev.frogmc.thyroxine.parser.ProguardParser;
import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData; import dev.frogmc.thyroxine.provider.MojmapProvider;
import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment; import dev.frogmc.thyroxine.provider.ParchmentProvider;
import org.ecorous.esnesnon.nonsense_remapper.parser.ProguardParser; import dev.frogmc.thyroxine.api.Mapper;
import org.ecorous.esnesnon.nonsense_remapper.provider.MojmapProvider; import dev.frogmc.thyroxine.api.data.MappingData;
import org.ecorous.esnesnon.nonsense_remapper.provider.ParchmentProvider; import dev.frogmc.thyroxine.api.data.Parchment;
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 NonsenseRemapper { public class Thyroxine {
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,19 +50,21 @@ public class NonsenseRemapper {
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 ->
NonsenseRemapper.computeInheritances(className, inFs))); Thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api; package dev.frogmc.thyroxine.api;
import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData; import dev.frogmc.thyroxine.api.data.MappingData;
import org.ecorous.esnesnon.nonsense_remapper.api.data.Member; import dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api; package dev.frogmc.thyroxine.api;
import org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment; import dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api; package dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment; import dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api.data; package dev.frogmc.thyroxine.api.data;
import org.objectweb.asm.Type; import org.objectweb.asm.Type;

View file

@ -1,4 +1,4 @@
package org.ecorous.esnesnon.nonsense_remapper.api.data; package dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api.data; package dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.parser; package dev.frogmc.thyroxine.parser;
import org.ecorous.esnesnon.nonsense_remapper.api.data.MappingData; import dev.frogmc.thyroxine.api.data.MappingData;
import org.ecorous.esnesnon.nonsense_remapper.api.data.Member; import dev.frogmc.thyroxine.api.data.Member;
public class ProguardParser { public class ProguardParser {

View file

@ -1,8 +1,8 @@
package org.ecorous.esnesnon.nonsense_remapper.provider; package dev.frogmc.thyroxine.provider;
import com.google.gson.*; import com.google.gson.*;
import org.ecorous.esnesnon.nonsense_remapper.Constants; import dev.frogmc.thyroxine.Constants;
import org.ecorous.esnesnon.nonsense_remapper.HttpHelper; import dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.provider; package dev.frogmc.thyroxine.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 org.ecorous.esnesnon.nonsense_remapper.api.data.Parchment; import dev.frogmc.thyroxine.api.data.Parchment;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;