From 62d9001ea2fe3804742d1d095638eca71af3924b Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 4 Jul 2024 12:41:26 +0800 Subject: [PATCH] chore: remove deprecated plugin wrapper Signed-off-by: Ryan Wang --- build.gradle | 6 +++++- src/main/java/run/halo/umami/UmamiPlugin.java | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index ab8ce0f..d984bea 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,11 @@ plugins { } group 'run.halo.umami' -sourceCompatibility = JavaVersion.VERSION_17 + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} repositories { maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' } diff --git a/src/main/java/run/halo/umami/UmamiPlugin.java b/src/main/java/run/halo/umami/UmamiPlugin.java index 1f20e09..9e02ab5 100644 --- a/src/main/java/run/halo/umami/UmamiPlugin.java +++ b/src/main/java/run/halo/umami/UmamiPlugin.java @@ -1,8 +1,9 @@ package run.halo.umami; -import org.pf4j.PluginWrapper; import org.springframework.stereotype.Component; + import run.halo.app.plugin.BasePlugin; +import run.halo.app.plugin.PluginContext; /** * @author guqing @@ -11,8 +12,8 @@ @Component public class UmamiPlugin extends BasePlugin { - public UmamiPlugin(PluginWrapper wrapper) { - super(wrapper); + public UmamiPlugin(PluginContext context) { + super(context); } @Override