Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
9770d0cb
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
12 个月 前同步成功
通知
76
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9770d0cb
编写于
11月 21, 2021
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build.gradle
上级
a22c9f12
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
181 addition
and
152 deletion
+181
-152
build.gradle
build.gradle
+177
-76
maxkey-webs/maxkey-web-maxkey/build.gradle
maxkey-webs/maxkey-web-maxkey/build.gradle
+2
-38
maxkey-webs/maxkey-web-mgt/build.gradle
maxkey-webs/maxkey-web-mgt/build.gradle
+2
-38
未找到文件。
build.gradle
浏览文件 @
9770d0cb
...
...
@@ -22,11 +22,42 @@ defaultTasks "clean", "build"
//Version define
ext
{
}
def
libjarsmapper
=[
'maxkey-authentication-otp'
:
'lib'
,
'maxkey-authentication-captcha'
:
'lib'
,
'maxkey-authentication-core'
:
'lib'
,
'maxkey-common'
:
'lib'
,
'maxkey-core'
:
'lib'
,
'maxkey-persistence'
:
'lib'
,
'maxkey-protocol-authorize'
:
'lib'
,
'maxkey-protocol-cas'
:
'lib'
,
'maxkey-protocol-desktop'
:
'lib'
,
'maxkey-protocol-extendapi'
:
'lib'
,
'maxkey-protocol-formbased'
:
'lib'
,
'maxkey-protocol-jwt'
:
'lib'
,
'maxkey-protocol-oauth-2.0'
:
'lib'
,
'maxkey-protocol-saml-2.0'
:
'lib'
,
'maxkey-protocol-tokenbased'
:
'lib'
,
'maxkey-web-resources'
:
'lib'
,
'maxkey-authentication-social'
:
'maxkey'
,
'maxkey-web-maxkey'
:
'maxkey'
,
'maxkey-identity-rest'
:
'maxkey_mgt'
,
'maxkey-identity-scim'
:
'maxkey_mgt'
,
'maxkey-web-mgt'
:
'maxkey_mgt'
,
'maxkey-synchronizers'
:
'maxkey_mgt'
,
'maxkey-synchronizers-activedirectory'
:
'maxkey_mgt'
,
'maxkey-synchronizers-ldap'
:
'maxkey_mgt'
,
'maxkey-synchronizers-dingding'
:
'maxkey_mgt'
,
'maxkey-synchronizers-workweixin'
:
'maxkey_mgt'
,
'maxkey-synchronizers-reorgdept'
:
'maxkey_mgt'
,
'maxkey-boot-monitor'
:
'maxkey_monitor'
]
configurations
.
all
{
transitive
=
false
// 为本依赖关闭依赖传递特性
transitive
=
false
// 为本依赖关闭依赖传递特性
}
//add support for Java
...
...
@@ -38,24 +69,23 @@ allprojects {
//apply plugin: "findbugs"
//apply plugin: "jdepend"
configurations
.
all
{
transitive
=
false
// 为本依赖关闭依赖传递特性
}
//java Version
sourceCompatibility
=
1.8
targetCompatibility
=
1.8
compileJava
.
options
.
encoding
=
'UTF-8'
/*
eclipse {
第一次时请注释这段eclipse设置,可能报错,设置工程字符集
jdt {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8') //use UTF-8
}
}
*/
configurations
.
all
{
transitive
=
false
// 为本依赖关闭依赖传递特性
}
//java Version
sourceCompatibility
=
1.8
targetCompatibility
=
1.8
compileJava
.
options
.
encoding
=
'UTF-8'
eclipse
{
/* 第一次时请注释这段eclipse设置,可能报错,设置工程字符集
jdt {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8') //use UTF-8
}*/
}
}
...
...
@@ -74,34 +104,39 @@ repositories {
}
// In this section you declare the dependencies for your production and test code
dependencies
{
}
subprojects
{
/*
eclipse {
第一次时请注释这段eclipse设置,可能报错,设置工程字符集
jdt {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8') //use UTF-8
}
}
*/
processResources
{
from
(
'src/main/resources'
)
{
include
'src/main/resources/*.*'
}
}
sourceSets
{
main
{
java
{
srcDir
'src/main/java'
// 指定源码目录
}
}
}
repositories
{
subprojects
{
/*
eclipse {
第一次时请注释这段eclipse设置,可能报错,设置工程字符集
jdt {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8') //use UTF-8
}
}
*/
processResources
{
from
(
'src/main/resources'
)
{
include
'src/main/resources/*.*'
}
}
sourceSets
{
main
{
java
{
srcDir
'src/main/java'
// 指定源码目录
}
}
}
repositories
{
mavenLocal
()
maven
{
url
"https://maven.aliyun.com/repository/central/"
}
maven
{
url
"https://maven.aliyun.com/repository/public/"
}
...
...
@@ -119,10 +154,11 @@ subprojects {
maven
{
url
"https://repository.apache.org/content/repositories/releases/"
}
mavenCentral
()
}
//all dependencies
dependencies
{
//for Test and Compile
//all dependencies
dependencies
{
//for Test and Compile
testImplementation
group:
'junit'
,
name:
'junit'
,
version:
"${junitVersion}"
compileOnly
group:
'junit'
,
name:
'junit'
,
version:
"${junitVersion}"
testImplementation
group:
'org.mockito'
,
name:
'mockito-all'
,
version:
"${mockitoallVersion}"
...
...
@@ -407,37 +443,102 @@ subprojects {
jar
{
def
currentTime
=
java
.
time
.
ZonedDateTime
.
now
()
manifest
{
attributes
(
"Implementation-Title"
:
project
.
name
,
"Implementation-Vendor"
:
project
.
vendor
,
"Created-By"
:
project
.
author
,
"Implementation-Date"
:
currentTime
,
"Implementation-Version"
:
project
.
version
)
}
}
task
buildRelease
()
{
dependsOn
assemble
//项目名
println
"subproject "
+
project
.
name
+
", group "
+
project
.
group
+
" , version "
+
project
.
version
}
def
currentTime
=
java
.
time
.
ZonedDateTime
.
now
()
manifest
{
attributes
(
"Implementation-Title"
:
project
.
name
,
"Implementation-Vendor"
:
project
.
vendor
,
"Created-By"
:
project
.
author
,
"Implementation-Date"
:
currentTime
,
"Implementation-Version"
:
project
.
version
)
}
}
tasks
.
register
(
"buildRelease"
,
Copy
)
{
dependsOn
assemble
//项目名 项目所在的group version 版本号
println
"subproject "
+
project
.
name
+
", group "
+
project
.
group
+
" , version "
+
project
.
version
//copy
into
"$rootDir/build/maxkey-jars/"
from
"$buildDir/libs/"
include
'*.jar'
}
tasks
.
register
(
"copyLibJars"
,
Copy
)
{
if
(
libjarsmapper
[
"${project.name}"
]
!=
null
){
into
"$rootDir/build/MaxKey-v${project.version}GA/"
+
libjarsmapper
[
"${project.name}"
]
from
"$buildDir/libs/"
include
'*.jar'
}
}
assemble
.
configure
{
finalizedBy
buildRelease
,
copyLibJars
}
}
//copy Dep Jars to /build/maxkey-depjars,only maxkey-common deps
project
(
'maxkey-common'
)
{
task
createReleaseDir
(
type:
Copy
){
def
paths
=
[
"$rootDir/build/MaxKey-v${project.version}GA"
,
"$rootDir/build/MaxKey-v${project.version}GA/maxkey"
,
"$rootDir/build/MaxKey-v${project.version}GA/maxkey_mgt"
,
"$rootDir/build/MaxKey-v${project.version}GA/maxkey_monitor"
,
"$rootDir/build/MaxKey-v${project.version}GA/lib"
];
//遍历数组,调用createDir闭包,创建目录
paths
.
forEach
(){
path
->
File
dir
=
new
File
(
path
);
if
(!
dir
.
exists
()){
print
(
"create "
+
path
+
"\n"
)
dir
.
mkdirs
();
}
};
}
task
copyDepJars
(
type:
Copy
){
dependsOn
assemble
println
"copy Dep Jars to $rootDir/build/MaxKey-v${project.version}GA/lib"
//copy runtime
from
configurations
.
runtimeClasspath
into
"$rootDir/build/MaxKey-v${project.version}GA/lib"
;
}
build
.
configure
{
finalizedBy
copyDepJars
}
}
assemble
.
configure
{
finalizedBy
buildRelease
}
//copy Dep Jars to /build/maxkey-depjars,only maxkey-boot-monitor deps
project
(
'maxkey-webs:maxkey-boot-monitor'
)
{
task
copyDepJars
(
type:
Copy
)
{
dependsOn
assemble
//项目名 项目所在的group version 版本号
println
"subproject "
+
project
.
name
+
", group "
+
project
.
group
+
" , version "
+
project
.
version
//copy runtime
from
configurations
.
runtimeClasspath
into
"$rootDir/build/MaxKey-v${project.version}GA/maxkey_monitor"
;
}
build
.
configure
{
finalizedBy
copyDepJars
}
}
tasks
.
register
(
"buildRelease"
)
{
//项目名 项目所在的group version 版本号
println
"Root project "
+
project
.
name
+
", group "
+
project
.
group
+
" , version "
+
project
.
version
//项目的绝对路径 to 项目的build文件绝对路径
println
"Root project projectDir "
+
project
.
projectDir
+
" to "
+
project
.
buildDir
dependsOn
'copyShellScript'
,
'copyWindowsShellScript'
//项目名 项目所在的group version 版本号
println
"Root project "
+
project
.
name
+
", group "
+
project
.
group
+
" , version "
+
project
.
version
//项目的绝对路径 to 项目的build文件绝对路径
println
"Root project projectDir "
+
project
.
projectDir
+
" to "
+
project
.
buildDir
}
build
.
configure
{
finalizedBy
buildRelease
}
tasks
.
register
(
"copyShellScript"
,
Copy
)
{
println
"project copyMaxKeyShellScript ."
;
from
"$rootDir/shellscript/"
into
"$rootDir/build/MaxKey-v${project.version}GA/shellscript/"
;
}
// In this section you declare the dependencies for your production and test code
dependencies
{
tasks
.
register
(
"copyWindowsShellScript"
,
Copy
)
{
println
"project copyMaxKeyWindowsShellScript ."
;
from
"$rootDir/shellscript/windows"
into
"$rootDir/build/MaxKey-v${project.version}GA/"
;
}
build
.
configure
{
finalizedBy
buildRelease
}
maxkey-webs/maxkey-web-maxkey/build.gradle
浏览文件 @
9770d0cb
buildscript
{
repositories
{
maven
{
url
'https://maven.aliyun.com/nexus/content/groups/public/'
}
}
}
plugins
{
id
'java'
id
'com.google.cloud.tools.jib'
version
"${jibGradlePluginVersion}"
id
'org.springframework.boot'
version
"${springBootVersion}"
}
apply
plugin:
'com.google.cloud.tools.jib'
description
=
"maxkey-web-maxkey"
//docker
jib
{
from
{
image
=
"${jibFromImage}"
}
to
{
//https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey
image
=
"${jibToImage}/maxkey"
tags
=
[
"${project.version}"
.
toString
(),
'latest'
]
auth
{
username
=
"${jibToAuthUsername}"
password
=
"${jibToAuthPassword}"
}
}
container
{
mainClass
=
"org.maxkey.MaxKeyApplication"
jvmFlags
=
[
'-Dfile.encoding=utf-8'
,
'-Dserver.port=443'
,
'-Duser.timezone=Asia/Shanghai'
]
ports
=
[
'443'
]
}
}
//build.configure { finalizedBy jib }
//add support for Java
apply
plugin:
'java'
dependencies
{
implementation
project
(
":maxkey-common"
)
...
...
@@ -58,5 +23,4 @@ dependencies {
implementation
project
(
":maxkey-protocols:maxkey-protocol-jwt"
)
implementation
project
(
":maxkey-webs:maxkey-web-resources"
)
}
maxkey-webs/maxkey-web-mgt/build.gradle
浏览文件 @
9770d0cb
buildscript
{
repositories
{
maven
{
url
'https://maven.aliyun.com/nexus/content/groups/public/'
}
}
}
//docker
plugins
{
id
'java'
id
'com.google.cloud.tools.jib'
version
"${jibGradlePluginVersion}"
id
'org.springframework.boot'
version
"${springBootVersion}"
}
apply
plugin:
'com.google.cloud.tools.jib'
description
=
"maxkey-web-mgt"
jib
{
from
{
image
=
"${jibFromImage}"
}
to
{
//https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey-mgt
image
=
"${jibToImage}/maxkey-mgt"
tags
=
[
"${project.version}"
.
toString
(),
'latest'
]
auth
{
username
=
"${jibToAuthUsername}"
password
=
"${jibToAuthPassword}"
}
}
container
{
mainClass
=
"org.maxkey.MaxKeyMgtApplication"
jvmFlags
=
[
'-Dfile.encoding=utf-8'
,
'-Dserver.port=9527'
,
'-Duser.timezone=Asia/Shanghai'
]
ports
=
[
'9527'
]
}
}
//build.configure { finalizedBy jib }
//add support for Java
apply
plugin:
'java'
dependencies
{
implementation
project
(
":maxkey-common"
)
...
...
@@ -60,5 +25,4 @@ dependencies {
implementation
project
(
":maxkey-identitys:maxkey-synchronizers-dingding"
)
implementation
project
(
":maxkey-webs:maxkey-web-resources"
)
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录