diff --git a/build.gradle b/build.gradle index ae34291..39e6824 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,11 @@ plugins { } group 'run.halo.lightgallery' -sourceCompatibility = JavaVersion.VERSION_17 + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} repositories { maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' } @@ -16,7 +20,7 @@ repositories { } dependencies { - implementation platform('run.halo.tools.platform:plugin:2.6.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/lightgallery/LightGalleryPlugin.java b/src/main/java/run/halo/lightgallery/LightGalleryPlugin.java index bbb2d94..3608898 100644 --- a/src/main/java/run/halo/lightgallery/LightGalleryPlugin.java +++ b/src/main/java/run/halo/lightgallery/LightGalleryPlugin.java @@ -1,8 +1,8 @@ package run.halo.lightgallery; -import org.pf4j.PluginWrapper; import org.springframework.stereotype.Component; import run.halo.app.plugin.BasePlugin; +import run.halo.app.plugin.PluginContext; /** * @author ryanwang @@ -10,8 +10,8 @@ @Component public class LightGalleryPlugin extends BasePlugin { - public LightGalleryPlugin(PluginWrapper wrapper) { - super(wrapper); + public LightGalleryPlugin(PluginContext pluginContext) { + super(pluginContext); } @Override diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml index 1c55c92..adf6371 100644 --- a/src/main/resources/plugin.yaml +++ b/src/main/resources/plugin.yaml @@ -4,7 +4,7 @@ metadata: name: PluginLightGallery spec: enabled: true - requires: ">=2.4.0" + requires: ">=2.10.0" author: name: Halo OSS Team website: https://github.com/halo-dev