Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gradle build script for ui project #5314

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Feb 2, 2024

What type of PR is this?

/kind cleanup
/kind feature
/area core
/milestone 2.13.x

What this PR does / why we need it:

This PR moves console folder to ui and add Gradle build script for ui project. Afterwards, we will no longer need to execute make -C console build before executing ./gradlew build.

Please note that the main commit is b1340f2.

Which issue(s) this PR fixes:

Fixes #5061

Special notes for your reviewer:

Execute command ./gradlew build and try to run the artifact by executing command java -jar application/build/libs/halo-2.13.0-SNAPSHOT.jar

Does this PR introduce a user-facing change?

None

@f2c-ci-robot f2c-ci-robot bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. labels Feb 2, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.13.x milestone Feb 2, 2024
@f2c-ci-robot f2c-ci-robot bot added kind/feature Categorizes issue or PR as related to a new feature. area/core Issues or PRs related to the Halo Core labels Feb 2, 2024
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7341f9d) 56.91% compared to head (0f9552d) 56.91%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5314   +/-   ##
=========================================
  Coverage     56.91%   56.91%           
  Complexity     3319     3319           
=========================================
  Files           587      587           
  Lines         18968    18968           
  Branches       1401     1401           
=========================================
  Hits          10795    10795           
  Misses         7594     7594           
  Partials        579      579           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ruibaby
Copy link
Member

ruibaby commented Feb 3, 2024

@JohnNiang
Copy link
Member Author

Hi @ruibaby , I have already proposed another PR halo-dev/docs#308 for adapting corresponding documentation.

@ruibaby
Copy link
Member

ruibaby commented Feb 4, 2024

> Task :application:processResources FAILED

Execution failed for task ':application:processResources'.
> Entry uc/favicon.ico is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.4/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
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.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1m 6s
30 actionable tasks: 8 executed, 22 up-to-date



我运行 ./gradlew build 无法成功。

@JohnNiang
Copy link
Member Author

Hi @ruibaby ,请先删除 application/src/main/resources/consoleapplication/src/main/resources/uc 目录后重试。

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2024
@JohnNiang
Copy link
Member Author

JohnNiang commented Feb 4, 2024

Hi @ruibaby ,现在有一个小问题,如果我们在 IDEA 通过 Gradle 运行项目或者直接通过 ./gradlew bootRun,都会去执行 ui 项目的 build,包括 check(包含 lint、typecheck 和 test),这样是否合理呢?如果不合理的话,我将重新整理 ui 和 application 项目之间的依赖关系。

当然,也可以通过 ./gradlew bootRun -x :ui:build 来避免 ui 项目的 build。

@ruibaby
Copy link
Member

ruibaby commented Feb 4, 2024

Hi @ruibaby ,现在有一个小问题,如果我们在 IDEA 通过 Gradle 运行项目或者直接通过 ./gradlew bootRun,都会去执行 ui 项目的 build,包括 check(包含 lint、typecheck 和 test),这样是否合理呢?如果不合理的话,我将重新整理 ui 和 application 项目之间的依赖关系。

当然,也可以通过 ./gradlew bootRun -x :ui:build 来避免 ui 项目的 build。

建议仅在 build 的时候去执行 ui 的 build,即便是开发环境,也推荐单独执行 :ui:dev。

@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2024
Copy link

sonarqubecloud bot commented Feb 6, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

@ruibaby
Copy link
Member

ruibaby commented Feb 6, 2024

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2024
@ruibaby
Copy link
Member

ruibaby commented Feb 6, 2024

/approve

Copy link

f2c-ci-robot bot commented Feb 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2024
@JohnNiang JohnNiang added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 6, 2024
@JohnNiang
Copy link
Member Author

I have to merge this PR manually due to workflow files changed.

@JohnNiang JohnNiang merged commit 2cf19a4 into halo-dev:main Feb 6, 2024
8 checks passed
@JohnNiang JohnNiang deleted the refactor/console-as-subproject branch February 6, 2024 06:23
f2c-ci-robot bot pushed a commit to halo-dev/docs that referenced this pull request Feb 6, 2024
This PR mainly adapts PR <halo-dev/halo#5314>.

```release-note
None
```
f2c-ci-robot bot pushed a commit that referenced this pull request Feb 7, 2024
#### What type of PR is this?

/area ui
/kind cleanup

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

Rename console to ui in some files,

Ref #5314

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

```release-note
None
```
f2c-ci-robot bot pushed a commit that referenced this pull request Feb 18, 2024
#### What type of PR is this?

/kind cleanup
/area core

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

The wrong `pre-commit` will prevent us from making a Git commit. The problem was caused by <#5314>.

```bash
ui/.husky/pre-commit: line 4: cd: console: No such file or directory
husky - pre-commit hook exited with code 1 (error)
```

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

```release-note
None
```
@ruibaby ruibaby modified the milestones: 2.13.x, 2.13.0 Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

将 console 源码目录重命名为 ui
3 participants