refactor: using halo plugin gradle plugin

This commit is contained in:
guqing
2022-10-08 11:03:30 +08:00
parent a058a08907
commit 6651fb995b
5 changed files with 10 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ plugins {
id 'org.springframework.boot' version '3.0.0-M3'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "com.github.node-gradle.node" version "3.3.0"
id "io.github.guqing.plugin-development" version "0.0.1-SNAPSHOT"
id 'java'
}
@@ -10,7 +11,6 @@ version '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_17
repositories {
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://repo.spring.io/milestone' }
mavenCentral()
}
@@ -33,10 +33,9 @@ jar {
}
dependencies {
compileOnly 'io.github.guqing:pluggable-suite:0.0.1-SNAPSHOT'
compileOnly "io.swagger.core.v3:swagger-core-jakarta:2.2.0"
compileOnly 'org.springframework.boot:spring-boot-starter-webflux'
annotationProcessor 'io.github.guqing:pluggable-suite:0.0.1-SNAPSHOT'
compileOnly 'org.pf4j:pf4j:3.6.0'
compileOnly files("lib/halo-2.0.0-SNAPSHOT-plain.jar")

View File

@@ -1,5 +1,6 @@
pluginManagement {
repositories {
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/spring-plugin' }
maven { url 'https://repo.spring.io/milestone' }

View File

@@ -1,6 +1,7 @@
package run.halo.template;
import org.pf4j.PluginWrapper;
import org.springframework.stereotype.Component;
import run.halo.app.extension.Scheme;
import run.halo.app.extension.SchemeManager;
import run.halo.app.plugin.BasePlugin;
@@ -9,12 +10,13 @@ import run.halo.app.plugin.BasePlugin;
* @author guqing
* @since 2.0.0
*/
@Component
public class TemplatePlugin extends BasePlugin {
private final SchemeManager schemeManager;
public TemplatePlugin(PluginWrapper wrapper) {
public TemplatePlugin(PluginWrapper wrapper, SchemeManager schemeManager) {
super(wrapper);
this.schemeManager = getApplicationContext().getBean(SchemeManager.class);
this.schemeManager = schemeManager;
}
@Override

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
.title[data-v-e696721c]{color:red}.title{font-size:20px}
.title[data-v-5b80c6f8]{color:red}.title{font-size:20px}