halo/api/build.gradle

104 lines
3.3 KiB
Groovy
Raw Normal View History

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
plugins {
id 'java-library'
id 'halo.publish'
2023-11-15 07:14:55 +00:00
id 'jacoco'
id "io.freefair.lombok"
Add Gradle plugin to discover dependency updates (#6761) #### What type of PR is this? /kind improvement /area core /milestone 2.20.x #### What this PR does / why we need it: This PR adds [a Gradle plugin ](https://github.com/ben-manes/gradle-versions-plugin)to discover dependency updates. ```bash ❯ ./gradlew dependencyUpdates -Drevision=release > Task :api:dependencyUpdates ------------------------------------------------------------ :api Project Dependency Updates (report to plain text file) ------------------------------------------------------------ The following dependencies are using the latest release version: - com.github.ben-manes.caffeine:caffeine:3.1.8 - com.github.java-json-tools:json-patch:1.13 - com.j256.two-factor-auth:two-factor-auth:1.3 - io.asyncer:r2dbc-mysql:1.3.0 - io.github.java-diff-utils:java-diff-utils:4.12 - io.github.resilience4j:resilience4j-reactor:2.2.0 - io.github.resilience4j:resilience4j-spring-boot3:2.2.0 - io.projectreactor:reactor-test:3.7.0-M6 - io.r2dbc:r2dbc-h2:1.0.0.RELEASE - io.seruco.encoding:base62:0.1.3 - org.apache.commons:commons-lang3:3.17.0 - org.imgscalr:imgscalr-lib:4.2 - org.jacoco:org.jacoco.agent:0.8.12 - org.jacoco:org.jacoco.ant:0.8.12 - org.mariadb:r2dbc-mariadb:1.2.2 - org.openapi4j:openapi-schema-validator:1.0.7 - org.pf4j:pf4j:3.12.0 - org.postgresql:postgresql:42.7.4 - org.postgresql:r2dbc-postgresql:1.0.5.RELEASE - org.projectlombok:lombok:1.18.30 - org.springdoc:springdoc-openapi-starter-webflux-ui:2.6.0 - org.springframework.boot:spring-boot-starter-actuator:3.4.0-M3 - org.springframework.boot:spring-boot-starter-cache:3.4.0-M3 - org.springframework.boot:spring-boot-starter-data-jpa:3.4.0-M3 - org.springframework.boot:spring-boot-starter-data-r2dbc:3.4.0-M3 - org.springframework.boot:spring-boot-starter-mail:3.4.0-M3 - org.springframework.boot:spring-boot-starter-security:3.4.0-M3 - org.springframework.boot:spring-boot-starter-test:3.4.0-M3 - org.springframework.boot:spring-boot-starter-thymeleaf:3.4.0-M3 - org.springframework.boot:spring-boot-starter-validation:3.4.0-M3 - org.springframework.boot:spring-boot-starter-webflux:3.4.0-M3 - org.springframework.integration:spring-integration-core:6.4.0-M3 - org.springframework.security:spring-security-oauth2-client:6.4.0-M4 - org.springframework.security:spring-security-oauth2-jose:6.4.0-M4 - org.springframework.security:spring-security-oauth2-resource-server:6.4.0-M4 - org.springframework.security:spring-security-test:6.4.0-M4 - org.springframework.session:spring-session-core:3.4.0-M2 - org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.2.RELEASE The following dependencies have later release versions: - com.google.guava:guava [32.0.1-jre -> 33.3.1-jre] https://github.com/google/guava - net.bytebuddy:byte-buddy [1.15.1 -> 1.15.3] https://bytebuddy.net - org.apache.lucene:lucene-analysis-common [9.11.1 -> 9.12.0] https://lucene.apache.org/ - org.apache.lucene:lucene-backward-codecs [9.11.1 -> 9.12.0] https://lucene.apache.org/ - org.apache.lucene:lucene-core [9.11.1 -> 9.12.0] https://lucene.apache.org/ - org.apache.lucene:lucene-highlighter [9.11.1 -> 9.12.0] https://lucene.apache.org/ - org.apache.lucene:lucene-queryparser [9.11.1 -> 9.12.0] https://lucene.apache.org/ - org.apache.tika:tika-core [2.9.2 -> 3.0.0-BETA2] https://tika.apache.org/ - org.jsoup:jsoup [1.15.3 -> 1.18.1] https://jsoup.org/ Gradle release-candidate updates: - Gradle: [8.10.2: UP-TO-DATE] Generated report file build/dependencyUpdates/report.txt > Task :application:dependencyUpdates ------------------------------------------------------------ :application Project Dependency Updates (report to plain text file) ------------------------------------------------------------ The following dependencies are using the latest release version: - com.puppycrawl.tools:checkstyle:9.3 - io.projectreactor:reactor-test:3.7.0-M6 - org.jacoco:org.jacoco.agent:0.8.12 - org.jacoco:org.jacoco.ant:0.8.12 - org.springframework:spring-context-indexer:6.2.0-RC1 - org.springframework.boot:spring-boot-configuration-processor:3.4.0-M3 - org.springframework.boot:spring-boot-starter-test:3.4.0-M3 - org.springframework.security:spring-security-test:6.4.0-M4 - org.webjars.npm:jsencrypt:3.3.2 - org.webjars.npm:normalize.css:8.0.1 The following dependencies have later release versions: - org.projectlombok:lombok [1.18.30 -> 1.18.34] https://projectlombok.org Gradle release-candidate updates: - Gradle: [8.10.2: UP-TO-DATE] Generated report file build/dependencyUpdates/report.txt Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD SUCCESSFUL in 1s 9 actionable tasks: 2 executed, 7 up-to-date ``` #### Does this PR introduce a user-facing change? <!-- 如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。 否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change), Release Note 需要以 `action required` 开头。 If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note None ```
2024-10-04 11:46:43 +00:00
id "com.github.ben-manes.versions"
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
}
group = 'run.halo.app'
description = 'API of halo project, connecting by other projects.'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
javadoc.options.encoding = "UTF-8"
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
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
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
}
dependencies {
api platform(project(':platform:application'))
api 'org.springframework.boot:spring-boot-starter-actuator'
api 'org.springframework.boot:spring-boot-starter-data-jpa'
api 'org.springframework.boot:spring-boot-starter-mail'
api 'org.springframework.boot:spring-boot-starter-thymeleaf'
api 'org.springframework.boot:spring-boot-starter-webflux'
api 'org.springframework.boot:spring-boot-starter-validation'
api 'org.springframework.boot:spring-boot-starter-data-r2dbc'
api 'org.springframework.session:spring-session-core'
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
// Spring Security
api 'org.springframework.boot:spring-boot-starter-security'
api 'org.springframework.security:spring-security-oauth2-jose'
api 'org.springframework.security:spring-security-oauth2-client'
api 'org.springframework.security:spring-security-oauth2-resource-server'
// Cache
api "org.springframework.boot:spring-boot-starter-cache"
api "com.github.ben-manes.caffeine:caffeine"
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
api "org.springdoc:springdoc-openapi-starter-webflux-ui"
api 'org.openapi4j:openapi-schema-validator'
api "net.bytebuddy:byte-buddy"
// Apache Lucene
api "org.apache.lucene:lucene-core"
api "org.apache.lucene:lucene-queryparser"
api "org.apache.lucene:lucene-highlighter"
api "org.apache.lucene:lucene-backward-codecs"
api 'org.apache.lucene:lucene-analysis-common'
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
api "org.apache.commons:commons-lang3"
api "io.seruco.encoding:base62"
api "org.pf4j:pf4j"
api "com.google.guava:guava"
api "org.jsoup:jsoup"
api "io.github.java-diff-utils:java-diff-utils"
api "org.springframework.integration:spring-integration-core"
api "com.github.java-json-tools:json-patch"
api "org.thymeleaf.extras:thymeleaf-extras-springsecurity6"
api 'org.apache.tika:tika-core'
api "org.imgscalr:imgscalr-lib"
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
api "io.github.resilience4j:resilience4j-spring-boot3"
api "io.github.resilience4j:resilience4j-reactor"
api "com.j256.two-factor-auth:two-factor-auth"
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
runtimeOnly 'io.r2dbc:r2dbc-h2'
runtimeOnly 'org.postgresql:postgresql'
runtimeOnly 'org.postgresql:r2dbc-postgresql'
runtimeOnly 'org.mariadb:r2dbc-mariadb'
Replace R2DBC MySQL driver to io.asyncer:r2dbc-mysql (#3918) #### What type of PR is this? /kind improvement /area core #### What this PR does / why we need it: Replace R2DBC MySQL driver to io.asyncer:r2dbc-mysql. See https://github.com/halo-dev/halo/issues/3804 for more. Please note that there will be an error like below when starting up Halo on MacOS: ```java 2023-05-09T14:24:45.161+08:00 ERROR 4668 --- [ restartedMain] i.n.r.d.DnsServerAddressStreamProviders : Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'. Use DEBUG level to see the full stack: java.lang.UnsatisfiedLinkError: failed to load the required native library ``` After manual test, I haven't found any problems caused by the error. And this only occurs on MacOS when developing. #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3804 #### Special notes for your reviewer: Steps to test: 1. Start up a MySQL server, e.g.: ```bash docker run -it --rm --name halodb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=openmysql -e MYSQL_DATABASE=halo mysql:8 ``` 3. Start Halo with mysql profile active ```bash make -C console dev ./gradlew bootRun --args="--spring.profiles.active=dev,mysql --halo.plugin.runtime-mode=deployment" ``` 5. Check the functionality of Halo #### Does this PR introduce a user-facing change? ```release-note 替换 R2DBC MySQL 驱动为:io.asyncer:r2dbc-mysql ```
2023-05-31 06:41:03 +00:00
runtimeOnly 'io.asyncer:r2dbc-mysql'
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
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'io.projectreactor:reactor-test'
}
java {
withSourcesJar()
withJavadocJar()
}
tasks.named('test') {
useJUnitPlatform()
2023-11-15 07:14:55 +00:00
finalizedBy jacocoTestReport
}
tasks.named('jacocoTestReport') {
reports {
xml.required = true
html.required = false
}
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
}