Compare commits

...

2 Commits

Author SHA1 Message Date
Johannes Frohnmeyer 08891229a9
chore(config-compiler-plugin): clean up a bit
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/jfmod Pipeline was successful Details
ci/woodpecker/tag/docs Pipeline was successful Details
ci/woodpecker/tag/jfmod Pipeline was successful Details
2024-04-25 11:52:13 +02:00
Johannes Frohnmeyer 4bcbc2b588
fix(config-core): use proper exception type in Migration 2024-04-25 11:51:58 +02:00
3 changed files with 3 additions and 6 deletions

View File

@ -3,7 +3,6 @@ package io.gitlab.jfronny.libjf.config.plugin;
import com.squareup.javapoet.ClassName;
public class Cl {
public static final ClassName MANIFOLD_EXTENSION = ClassName.get("manifold.ext.rt.api", "Extension");
public static final ClassName MANIFOLD_THIS = ClassName.get("manifold.ext.rt.api", "This");
}

View File

@ -15,8 +15,8 @@ public record ConfigClass(
) {
public static ConfigClass of(TypeElement element, String[] referencedConfigs, TypeName tweakerName, boolean hasManifold) {
ClassName className = ClassName.get(element);
String pkg = hasManifold ? "gsoncompile.extensions." + className.packageName() + "." + className.simpleNames().get(0) : className.packageName();
ClassName generatedClassName = ClassName.get(pkg, "JFC_" + className.simpleNames().get(0), className.simpleNames().subList(1, className.simpleNames().size()).toArray(String[]::new));
String pkg = hasManifold ? "gsoncompile.extensions." + className.packageName() + "." + className.simpleNames().getFirst() : className.packageName();
ClassName generatedClassName = ClassName.get(pkg, "JFC_" + className.simpleNames().getFirst(), className.simpleNames().subList(1, className.simpleNames().size()).toArray(String[]::new));
return new ConfigClass(element, ClassName.get(element), TypeName.get(element.asType()), generatedClassName, referencedConfigs, tweakerName);
}

View File

@ -2,9 +2,7 @@ package io.gitlab.jfronny.libjf.config.api.v2.dsl;
import io.gitlab.jfronny.commons.serialize.SerializeReader;
import java.io.IOException;
@FunctionalInterface
public interface Migration {
<TEx extends Exception, Reader extends SerializeReader<TEx, Reader>> void apply(Reader reader) throws IOException;
<TEx extends Exception, Reader extends SerializeReader<TEx, Reader>> void apply(Reader reader) throws TEx;
}