From bfc28d4aaccc65f26122bb4c8d78c7880e5b4e73 Mon Sep 17 00:00:00 2001 From: Wagyourtail Date: Wed, 6 Mar 2024 12:13:28 -0700 Subject: [PATCH] fix publish --- .idea/workspace.xml | 162 +++++++----------- build.gradle.kts | 5 +- gradle/wrapper/gradle-wrapper.properties | 2 +- .../jvmdg/exc/MissingStubError.java | 16 ++ 4 files changed, 82 insertions(+), 103 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a853af8a..d0f2c0c2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,107 +5,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + true + true + false + false + + + + + + + + true + true + false + false + + + + + + diff --git a/build.gradle.kts b/build.gradle.kts index 3d67a5d3..ec9abb52 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -160,9 +160,12 @@ publishing { version = rootProject.version as String artifact(project.tasks.jar) {} - artifact(project.tasks["jarInJar"]) { + artifact(project.tasks.shadowJar) { classifier = "all" } + artifact(project.tasks["jarInJar"]) { + classifier = "all-java-api" + } } } } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 29d27311..e846b64f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file diff --git a/src/main/java/xyz/wagyourtail/jvmdg/exc/MissingStubError.java b/src/main/java/xyz/wagyourtail/jvmdg/exc/MissingStubError.java index 50ef4c48..c144e0cf 100644 --- a/src/main/java/xyz/wagyourtail/jvmdg/exc/MissingStubError.java +++ b/src/main/java/xyz/wagyourtail/jvmdg/exc/MissingStubError.java @@ -1,9 +1,25 @@ package xyz.wagyourtail.jvmdg.exc; +import org.objectweb.asm.Type; + public class MissingStubError extends Error { public MissingStubError(String message) { super(message); } + public static MissingStubError create() { + StackTraceElement prev = new Error().getStackTrace()[1]; + return new MissingStubError("Missing stub body for " + prev.getClassName() + "." + prev.getMethodName() + " at " + prev.getFileName() + ":" + prev.getLineNumber()); + } + + public static MissingStubError create(Type type, String name, Type desc) { + StackTraceElement prev = new Error().getStackTrace()[1]; + if (name == null) { + return new MissingStubError("Missing stub for " + type.getClassName() + " at " + prev.getFileName() + ":" + prev.getLineNumber()); + } else { + return new MissingStubError("Missing stub for " + type.getClassName() + "." + name + ";" + desc + " at " + prev.getFileName() + ":" + prev.getLineNumber()); + } + } + }