From f10c7701839bc5de81452dc8010545e91e6a0262 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 5 Jul 2024 14:56:50 +0800 Subject: [PATCH] chore: cleanup deprecated constructor for base plugin Signed-off-by: Ryan Wang --- build.gradle | 2 +- src/main/java/run/halo/katex/KatexPlugin.java | 15 ++++----------- src/main/resources/plugin.yaml | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index d27d8b6..89a5b8c 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ repositories { } dependencies { - implementation platform('run.halo.tools.platform:plugin:2.7.0-SNAPSHOT') + implementation platform('run.halo.tools.platform:plugin:2.10.0-SNAPSHOT') compileOnly 'run.halo.app:api' testImplementation 'run.halo.app:api' diff --git a/src/main/java/run/halo/katex/KatexPlugin.java b/src/main/java/run/halo/katex/KatexPlugin.java index 1d1c56b..c3d623d 100644 --- a/src/main/java/run/halo/katex/KatexPlugin.java +++ b/src/main/java/run/halo/katex/KatexPlugin.java @@ -1,21 +1,14 @@ package run.halo.katex; -import org.pf4j.PluginWrapper; import org.springframework.stereotype.Component; + import run.halo.app.plugin.BasePlugin; +import run.halo.app.plugin.PluginContext; @Component public class KatexPlugin extends BasePlugin { - public KatexPlugin(PluginWrapper wrapper) { - super(wrapper); - } - - @Override - public void start() { - } - - @Override - public void stop() { + public KatexPlugin(PluginContext context) { + super(context); } } diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml index 7030135..c208f98 100644 --- a/src/main/resources/plugin.yaml +++ b/src/main/resources/plugin.yaml @@ -4,7 +4,7 @@ metadata: name: plugin-katex spec: enabled: true - requires: ">=2.7.0" + requires: ">=2.10.0" author: name: Halo OSS Team website: https://github.com/halo-dev