Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
b5f73560
提交
b5f73560
authored
5月 10, 2024
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: upgrade deps && change hooks
上级
cc06d883
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
42 行增加
和
32 行删除
+42
-32
build.gradle
build.gradle
+7
-32
settings.gradle
settings.gradle
+35
-0
没有找到文件。
build.gradle
浏览文件 @
b5f73560
...
...
@@ -5,11 +5,11 @@ plugins {
id
'org.springframework.boot'
version
'3.2.5'
id
'org.graalvm.buildtools.native'
version
'0.9.28'
// https://plugins.gradle.org/plugin/io.spring.dependency-management
id
'io.spring.dependency-management'
version
'1.1.
4
'
id
'io.spring.dependency-management'
version
'1.1.
5
'
// https://plugins.gradle.org/plugin/com.diffplug.spotless
id
"com.diffplug.spotless"
version
"6.25.0"
// https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties
id
"com.gorylenko.gradle-git-properties"
version
"2.4.
1
"
id
"com.gorylenko.gradle-git-properties"
version
"2.4.
2
"
}
ext
{
...
...
@@ -33,7 +33,7 @@ ext {
// Sentry
// https://central.sonatype.com/artifact/io.sentry/sentry-spring-boot-starter-jakarta
sentryVersion
=
'7.
8
.0'
sentryVersion
=
'7.
9
.0'
// Dependencies
// https://central.sonatype.com/artifact/com.github.xiaoymin/knife4j-openapi3-jakarta-spring-boot-starter
...
...
@@ -48,14 +48,12 @@ ext {
fastJsonVersion
=
'2.0.49'
// https://central.sonatype.com/artifact/com.xuxueli/xxl-job-core
xxlJobVersion
=
'2.4.1'
// https://central.sonatype.com/artifact/com.squareup.okhttp3/okhttp
okhttpVersion
=
'4.12.0'
// https://central.sonatype.com/artifact/io.minio/minio
minioVersion
=
'8.5.
9
'
minioVersion
=
'8.5.
10
'
// https://central.sonatype.com/artifact/io.hypersistence/hypersistence-utils-hibernate-63
hibernateTypesVersion
=
'3.7.
4
'
hibernateTypesVersion
=
'3.7.
5
'
// https://central.sonatype.com/artifact/org.hibernate.orm/hibernate-spatial
hibernateSpatialVersion
=
'6.4.
4
.Final'
hibernateSpatialVersion
=
'6.4.
8
.Final'
// https://central.sonatype.com/artifact/org.locationtech.jts/jts-core
jtsVersion
=
'1.19.0'
// https://central.sonatype.com/artifact/com.github.liaochong/myexcel
...
...
@@ -150,33 +148,10 @@ subprojects {
prettier
([
'prettier'
:
prettierVersion
,
'prettier-plugin-java'
:
prettierJavaVersion
]).
config
([
'parser'
:
'java'
,
'tabWidth'
:
4
,
'useTabs'
:
false
,
'printWidth'
:
120
,
'endOfLine'
:
'lf'
])
}
}
}
tasks
.
register
(
'preCommit'
)
{
// fix: CI/CD
try
{
// GitHook pre-commit (spotless, spotbugs)
def
hook
=
new
File
(
"$rootProject.projectDir/.git/hooks/pre-commit"
)
hook
.
text
=
"""#!/bin/bash
#set -x
./gradlew spotlessCheck
RESULT=\$?
exit \$RESULT
"""
}
catch
(
ignored
)
{
}
}
gradle
.
getTaskGraph
().
whenReady
{
def
skipHooks
=
gradle
.
startParameter
.
getSystemPropertiesArgs
().
containsKey
(
'skip-hooks'
)
if
(!
skipHooks
)
{
preCommit
}
}
settings.gradle
浏览文件 @
b5f73560
...
...
@@ -5,6 +5,11 @@
// }
//}
plugins
{
// https://plugins.gradle.org/plugin/org.danilopianini.gradle-pre-commit-git-hooks
id
"org.danilopianini.gradle-pre-commit-git-hooks"
version
"2.0.5"
}
rootProject
.
name
=
'basic-api-boot'
include
'app'
include
'basic-auth'
...
...
@@ -17,3 +22,33 @@ include 'basic-common:minio'
include
'basic-common:redis'
include
'basic-common:i18n'
gitHooks
{
extension
->
extension
.
with
{
preCommit
{
context
->
context
.
with
{
from
(
"#!/bin/bash"
)
{
"""
#set -x
./gradlew spotlessCheck
RESULT=\$?
exit \$RESULT
"""
}
}
}
commitMsg
{
context
->
context
.
with
{
conventionalCommits
{
conventionalCommits
->
conventionalCommits
.
with
{
defaultTypes
()
}
}
}
}
createHooks
(
true
)
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论