Commit Graph

36 Commits (f24b08c7db748cb93f5af9bb83c0b1ee724e1041)

Author SHA1 Message Date
Ryan Wang 1f71532327
chore: bump preset plugins version (#5839)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.15.0

#### What this PR does / why we need it:

升级所有预设插件的版本。

#### Does this PR introduce a user-facing change?

```release-note
None
```
2024-04-30 06:38:17 +00:00
John Niang 3c20ce3c55
Generate API docs and regenerate API client (#5742)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR adds support for generating API docs into project and generate API client according the API docs.

To generate/update latest API docs, execute the following command:

```bash
./gradlew clean generateOpenApiDocs
```

To generate/update latest API client, execute the following command:

```bash
make -C ui api-client-gen
```

Meanwhile, I also remove the lint on API client due to unnecessary.

Supersedes of https://github.com/halo-dev/halo/pull/5637

#### Does this PR introduce a user-facing change?

```release-note
None
```
2024-04-19 02:34:07 +00:00
John Niang 0843747abc
Collect Gradle plugin versions into root build.gradle (#5511)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR collects all Gradle plugin versions into root build.gradle for easy management.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2024-03-15 10:34:07 +00:00
John Niang 956f4ef3f3
Set source and target compatibility to Java 17 (#5499)
#### What type of PR is this?

/kind chore
/area core

#### What this PR does / why we need it:

I get the following errors when I develop Halo in JDK 21:

```bash
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':application:bootRun'.
> Could not resolve all dependencies for configuration ':application:runtimeClasspath'.
   > Failed to calculate the value of task ':application:compileJava' property 'javaCompiler'.
      > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
         > No locally installed toolchains match and toolchain download repositories have not been configured.
```

This PR removes the Java toolchain configuration and adds source and target compatibility to Java 17, allowing developers to develop Halo in Java 17 or higher versions.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2024-03-12 07:44:07 +00:00
Ryan Wang 6ea7abeff2
chore: bump preset plugins version (#5423)
#### What type of PR is this?

/area core
/milestone 2.13.0
/kind improvement

#### What this PR does / why we need it:

更新预设插件的版本。

#### Does this PR introduce a user-facing change?

```release-note
None
```
2024-02-29 16:43:39 +00:00
John Niang 348079d82e
Upgrade Spring Boot to 3.2.3 (#5402)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.13.x

#### What this PR does / why we need it:

Upgrade Spring Boot to [3.2.3](https://github.com/spring-projects/spring-boot/releases/tag/v3.2.3).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.2.3
```
2024-02-25 14:24:08 +00:00
John Niang 0f9552d923 Do not execute :ui:build when application is not building
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-02-06 10:37:14 +08:00
John Niang a3772fab1b Add build script for ui project
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-02-03 22:51:50 +08:00
John Niang 9d9b1527bc
Upgrade Spring Boot to 3.2.2 (#5232)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.2 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.2.2
```
2024-01-23 05:11:41 +00:00
John Niang 883c1fadb6 Refactor workflow by not using composite actions from halo-sigs/actions
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-10 14:14:36 +08:00
John Niang 3bb2d8fbae Upgrade to Spring Boot 3.2.0 2023-11-24 00:09:45 +08:00
John Niang b04496e4f3
Upgrade to SpringDoc 2.2.1-SNAPSHOT (#4854)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.11.x

#### What this PR does / why we need it:

This PR upgrades to SpringDoc 2.2.1-SNAPSHOT to resolve the problem of Swagger API doc display errors.

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc 至 2.2.1-SNAPSHOT 以解决部分 API 文档无法正常使用的问题
```
2023-11-15 03:04:09 +00:00
John Niang 65a7e970cd
Upgrade to Spring Boot 3.2.0-RC2 (#4850)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.11.x

#### What this PR does / why we need it:

- Upgrade to Spring Boot 3.2.0-RC2.
- Fix unit test errors due to upgrading.

See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.0-RC2 for more.

#### Does this PR introduce a user-facing change?

Anyone who is using H2 database and wants to upgrade this version has to backup and restore Halo or upgrade old h2 database file manually.

```release-note
[Action Required] 升级 Spring Boot 至 3.2.0-RC2
```
2023-11-13 09:28:08 +00:00
John Niang 841aa96e59
Upgrade to Lombok gradle plugin 8.4 (#4849)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.11.x

#### What this PR does / why we need it:

Upgrade to Lombok gradle plugin 8.4.

See https://docs.freefair.io/gradle-plugins/8.4/reference/#_installation and https://docs.freefair.io/gradle-plugins/8.4/reference/#_system_requirements for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 Lombok Gradle 插件至 8.4
```
2023-11-13 03:08:09 +00:00
John Niang ee52adf24c
Fix the problem where some Windows developers are unable to build project (#4844)
#### What type of PR is this?

/kind bug
/area core

#### What this PR does / why we need it:

Currently, some Windows developers using GBK as character encoding are unable to build project, please see https://github.com/halo-dev/halo/issues/4771 for more. 

Because the source code are using UTF-8 character encoding, the `javadoc`, `compileJava`, `compileTestJava` and `delombok` tasks will use the default character encoding GBK to handle the sources, which prevents the `:api:javadoc` task from running properly.

At the same time, we thank to @DaiYuANg for his first proposed solution in https://github.com/halo-dev/halo/pull/4517.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4771

#### Special notes for your reviewer:

Validate the result by executing command `./gradlew clean build -x check` on Windows environment.

#### Does this PR introduce a user-facing change?

```release-note
修复在部分 Windows 开发者无法正常构建 Halo 的问题
```
2023-11-12 04:30:08 +00:00
John Niang 21e975d60a
Upgrade to Spring Boot 3.1.5 (#4758)
#### What type of PR is this?

/kind cleanup

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.1.5. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.5 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.1.5
```
2023-10-20 03:24:44 +00:00
Ryan Wang a81b073ab3
chore: bump app store plugin version to 1.0.0-beta.2 (#4699)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.10.x

#### What this PR does / why we need it:

修改应用市场插件的版本为 [1.0.0-beta.2](https://github.com/halo-dev/plugin-app-store/releases/tag/v1.0.0-beta.2)


#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-10-10 03:30:28 +00:00
Ryan Wang 45787e1e20
chore: add app store plugin as preset-plugin (#4670)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.10.x

#### What this PR does / why we need it:

添加 https://github.com/halo-dev/plugin-app-store 作为预设插件。

#### Does this PR introduce a user-facing change?

```release-note
添加应用市场预设插件
```
2023-09-28 13:30:23 +00:00
John Niang d002579456
Upgrade to Spring Boot 3.1.4 (#4665)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.10.0

#### What this PR does / why we need it:

Upgrade to Spring Boot [3.1.4](https://github.com/spring-projects/spring-boot/releases/tag/v3.1.4).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.1.4
```
2023-09-27 05:02:23 +00:00
Ryan Wang 2c7c0da373
chore: update preset plugins (#4668)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.10.x

#### What this PR does / why we need it:

升级所有预设插件的版本。

#### Special notes for your reviewer:

执行 `./gradlew downloadPluginPresets` 检查是否能够正常下载。

#### Does this PR introduce a user-facing change?

```release-note
升级所有预设插件的版本。
```
2023-09-27 04:06:16 +00:00
Ryan Wang da2d56e7d3
chore: update download url of presets plugin (#4615)
#### What type of PR is this?

/area core
/kind cleanup

#### What this PR does / why we need it:

修改预设插件的下载地址,目前四个预设插件的仓库都已经转移到 halo-dev 组织。

#### Special notes for your reviewer:

需要测试 `./gradlew downloadPluginPresets` 是否能够正常下载预设插件。 

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-09-18 02:26:18 +00:00
John Niang 229bcafe71
Upgrade Spring Boot to 3.1.3 (#4478)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.9.x

#### What this PR does / why we need it:

This PR upgrades Spring Boot to 3.1.3. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.3 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.1.3
```
2023-08-25 08:40:11 +00:00
John Niang 1172f4a98c
Support restarting Halo (#4361)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.9.x

#### What this PR does / why we need it:

Support restarting Halo and enable restart endpoint by default.

Restart endpoint detail:

request uri: `/actuator/restart`
request method: `POST`

Please note that memory usage may slightly increase after restarting Halo.

#### Does this PR introduce a user-facing change?

```release-note
支持在线重启 Halo。
```
2023-08-09 06:04:11 +00:00
John Niang 15dd7826dc
Bump plugin preset (#4287)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.8.x

#### What this PR does / why we need it:

Bump plugin preset. See https://github.com/halo-sigs/plugin-comment-widget/releases/tag/v1.7.0 for more.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-07-24 09:08:14 +00:00
John Niang e98aec32ca
Upgrade Spring Boot 3.1.2 (#4284)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.8.x

#### What this PR does / why we need it:

Upgrade Spring Boot 3.1.2. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.2 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.2。
```
2023-07-24 03:20:14 +00:00
Ryan Wang 668018e6a0
chore: update preset plugins (#4159)
#### What type of PR is this?

/area plugin
/area core
/milestone 2.7.x

#### What this PR does / why we need it:

Update preset plugins version

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-06-30 03:00:12 +00:00
John Niang 25103b9ff8
Upgrade Spring Boot to 3.1.1 (#4136)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.7.x

#### What this PR does / why we need it:

Upgrade Spring Boot to 3.1.1. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.1 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.1
```
2023-06-28 08:08:11 +00:00
John Niang 02369fbd3c
Add rate limiter for login endpoint (#4062)
#### What type of PR is this?

/kind feature
/area core

#### What this PR does / why we need it:

This PR introduces https://github.com/resilience4j/resilience4j to archive the feature. The login endpoint has limited login failures at a rate of 3 per minute.

See https://github.com/halo-dev/halo/issues/4044 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4044

#### Special notes for your reviewer:

1. Start Halo.
2. Try to login with incorrect credential 4 times
3. Check the response.

#### Does this PR introduce a user-facing change?

```release-note
增加登录失败次数限制功能
```
2023-06-16 04:50:12 +00:00
guqing 350e54d42a
chore: bump google guava version to 32.0.1-jre (#4081)
#### What type of PR is this?
/milestone 2.7.x
/area core

#### What this PR does / why we need it:
升级 Google Guava 版本至 32.0.1-jre

Guava [31.1](https://github.com/google/guava/releases/tag/v31.1) 至 [32.0.1](https://github.com/google/guava/releases/tag/v32.0.1) 的变化:
1. 移除了部分 API 的 `@Beta` 注解进入稳定版
2. 关于 `Files.createTempDir` 方法的安全性修复 https://github.com/advisories/GHSA-7g45-4rm6-3mm3 (https://github.com/google/guava/issues/2575)

详情参考:https://github.com/google/guava/releases/tag/v32.0.0

#### Does this PR introduce a user-facing change?

```release-note
升级 Google Guava 版本至 32.0.1-jre
```
2023-06-15 14:30:12 +00:00
John Niang 4abe16f20a
Upgrade to Spring Boot 3.1.0 (#3996)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.6.x

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.1.0, please refer to <https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0>.

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.0
```
2023-05-25 13:22:18 +00:00
John Niang c0c1806476
Upgrade to Spring Boot 3.1.0-RC2 (#3917)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.1.0-RC2.

See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0-RC2 and https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0-RC1 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3816

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.0-RC2
```
2023-05-09 04:31:43 +00:00
John Niang 814dc8921a
Upgrade plugin presets (#3854)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Upgrade to plugin-sitemap 1.0.2 and plugin-feed 1.1.1.

```bash
❯ ./gradlew :application:downloadPluginPresets  
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Task :application:downloadPluginPresets
Download https://github.com/halo-sigs/plugin-search-widget/releases/download/v1.0.0/plugin-search-widget-1.0.0.jar
Download https://github.com/halo-sigs/plugin-comment-widget/releases/download/v1.5.0/plugin-comment-widget-1.5.0.jar
Download https://github.com/halo-sigs/plugin-sitemap/releases/download/v1.0.2/plugin-sitemap-1.0.2.jar
Download https://github.com/halo-sigs/plugin-feed/releases/download/v1.1.1/plugin-feed-1.1.1.jar

BUILD SUCCESSFUL in 4s
8 actionable tasks: 1 executed, 7 up-to-date
```

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3850

#### Does this PR introduce a user-facing change?

```release-note
升级预设插件
```
2023-04-26 07:06:12 +00:00
John Niang 6ca2cabffb
Upgrade to Spring Boot 3.0.6 (#3832)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.0.6.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3829

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.0.6
```
2023-04-24 07:47:43 +00:00
John Niang a215c3faeb
Upgrade to plugin-comment-widget 1.5.0 (#3649)
#### What type of PR is this?

/kind cleanup

#### What this PR does / why we need it:

Upgrade to plugin-comment-widget 1.5.0.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-03-31 03:20:18 +00:00
John Niang a0b4a0eb0b
Upgrade to Spring Boot 3.0.5 (#3609)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

See https://github.com/halo-dev/halo/issues/3599 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3599

#### Does this PR introduce a user-facing change?

```release-note
升级至 Spring Boot 3.0.5
```
2023-03-28 15:42:12 +00:00
John Niang c400c85922
Refactor project structure for a better development (#3552)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR totally refactor project structure for a better plugin development. Now we can maintain and publish api and platform modules at Halo application side, which will be references by plugins.

Currently, we can execute command `./gradlew clean publish` to publish api and platform modules into **local** Maven repository, so that we can refer these dependencies (`run.halo.tools.platform:plugin:2.4.0-SNAPSHOT` and `run.halo.app:api:2.4.0-SNAPSHOT`) in plugin projects. 

I will make another pull request to publish api library and platforms into Maven central repository.

**Modules explanation**:
- API module contains common classes which might be used by plugins.
- Plugin Platform module contains dependency declarations of other plugin API modules.
- Application Platform module contains dependency declarations application module might uses.

If we want to build application only(exclude check and jar), we have to execute the command below:

```bash
./gradlew clean :application:build -x :application:check -x :application:jar
```

The executable Jar will be generated at folder `application/build/libs/`.

If we want to build a Docker image, we could execute the command below:

```bash
docker build -t johnniang/halo:project-structure .

# Test the Docker image
docker run -it --rm -p8090:8090 johnniang/halo:project-structure
```

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2730

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
重构项目结构
```
2023-03-23 08:02:33 +00:00