From 32b0f69c50ec5fce40ca85c806ffa41ea119fbc6 Mon Sep 17 00:00:00 2001 From: shimingxy Date: Fri, 19 Jul 2024 16:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=96=B9=E5=BC=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_cnf.gradle | 24 +- config/build_standard.gradle | 207 ++++++----------- ...uild_jar.gradle => build_tradition.gradle} | 214 ++++++++++++------ .../config/build_docker.gradle | 12 +- .../maxkey-web-maxkey/config/build_jar.gradle | 58 ----- .../config/build_standard.gradle | 50 +++- .../config/build_tradition.gradle | 30 +++ .../maxkey-web-mgt/config/build_docker.gradle | 10 +- .../maxkey-web-mgt/config/build_jar.gradle | 65 ------ .../config/build_standard.gradle | 48 +++- .../config/build_tradition.gradle | 31 +++ .../config/build_docker.gradle | 10 +- .../config/build_jar.gradle | 60 ----- .../config/build_standard.gradle | 51 ++++- .../config/build_tradition.gradle | 27 +++ release_cnf_standard.bat | 4 +- ...e_cnf_jar.bat => release_cnf_tradition.bat | 4 +- 17 files changed, 463 insertions(+), 442 deletions(-) rename config/{build_jar.gradle => build_tradition.gradle} (85%) delete mode 100644 maxkey-webs/maxkey-web-maxkey/config/build_jar.gradle create mode 100644 maxkey-webs/maxkey-web-maxkey/config/build_tradition.gradle delete mode 100644 maxkey-webs/maxkey-web-mgt/config/build_jar.gradle create mode 100644 maxkey-webs/maxkey-web-mgt/config/build_tradition.gradle delete mode 100644 maxkey-webs/maxkey-web-openapi/config/build_jar.gradle create mode 100644 maxkey-webs/maxkey-web-openapi/config/build_tradition.gradle rename release_cnf_jar.bat => release_cnf_tradition.bat (59%) diff --git a/build_cnf.gradle b/build_cnf.gradle index 8c21d5d53..88324e4df 100644 --- a/build_cnf.gradle +++ b/build_cnf.gradle @@ -33,30 +33,30 @@ task clearBuild(){ delete "$rootDir/maxkey-webs/maxkey-web-openapi/build.gradle" } -task configStd(dependsOn:['clearBuild']) { +task configTradition(dependsOn:['clearBuild']) { doLast { copy { - from "$rootDir/maxkey-webs/maxkey-web-openapi/config/build_standard.gradle" + from "$rootDir/maxkey-webs/maxkey-web-openapi/config/build_tradition.gradle" into "$rootDir/maxkey-webs/maxkey-web-openapi/" rename { String fileName -> 'build.gradle' } } copy { - from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle" + from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_tradition.gradle" into "$rootDir/maxkey-webs/maxkey-web-mgt/" rename { String fileName -> 'build.gradle' } } copy { - from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle" + from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_tradition.gradle" into "$rootDir/maxkey-webs/maxkey-web-maxkey/" rename { String fileName -> 'build.gradle' } } copy { - from "$rootDir/config/build_standard.gradle" + from "$rootDir/config/build_tradition.gradle" into "$rootDir/" rename { String fileName -> 'build.gradle' } } - println 'Standard Build MaxKey .' + println 'Tradition Build MaxKey .' } } @@ -91,32 +91,32 @@ task configDocker(dependsOn:['clearBuild']) { -task configJar(dependsOn:['clearBuild']) { +task configStandard(dependsOn:['clearBuild']) { doLast { copy { - from "$rootDir/maxkey-webs/maxkey-web-openapi/config/build_jar.gradle" + from "$rootDir/maxkey-webs/maxkey-web-openapi/config/build_standard.gradle" into "$rootDir/maxkey-webs/maxkey-web-openapi/" rename { String fileName -> 'build.gradle' } } copy { - from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_jar.gradle" + from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle" into "$rootDir/maxkey-webs/maxkey-web-mgt/" rename { String fileName -> 'build.gradle' } } copy { - from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_jar.gradle" + from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle" into "$rootDir/maxkey-webs/maxkey-web-maxkey/" rename { String fileName -> 'build.gradle' } } copy { - from "$rootDir/config/build_jar.gradle" + from "$rootDir/config/build_standard.gradle" into "$rootDir/" rename { String fileName -> 'build.gradle' } } - println 'Java Jar Build MaxKey .' + println 'Standard Build MaxKey .' } } diff --git a/config/build_standard.gradle b/config/build_standard.gradle index 4d82bfe05..bc9a4b0d0 100644 --- a/config/build_standard.gradle +++ b/config/build_standard.gradle @@ -22,47 +22,11 @@ defaultTasks "clean", "build" //Version define ext { - + } -def libjarsmapper=[ - 'maxkey-authentication-captcha' :'lib', - 'maxkey-authentication-core' :'lib', - 'maxkey-authentication-ip2region' :'lib', - 'maxkey-authentication-otp' :'lib', - 'maxkey-authentication-provider' :'lib', - 'maxkey-authentication-sms' :'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-web-mgt' :'maxkey_mgt', - 'maxkey-synchronizer' :'maxkey_mgt', - 'maxkey-synchronizer-activedirectory' :'maxkey_mgt', - 'maxkey-synchronizer-common' :'maxkey_mgt', - 'maxkey-synchronizer-jdbc' :'maxkey_mgt', - 'maxkey-synchronizer-ldap' :'maxkey_mgt', - 'maxkey-synchronizer-dingtalk' :'maxkey_mgt', - 'maxkey-synchronizer-workweixin' :'maxkey_mgt', - 'maxkey-synchronizer-reorgdept' :'maxkey_mgt', - 'maxkey-web-openapi' :'maxkey_openapi', - 'maxkey-web-api-rest' :'maxkey_openapi', - 'maxkey-web-api-scim' :'maxkey_openapi', -] - configurations.all { - transitive = false// 为本依赖关闭依赖传递特性 + transitive = false// 为本依赖关闭依赖传递特性 } //add support for Java @@ -74,14 +38,14 @@ allprojects { //apply plugin: "findbugs" //apply plugin: "jdepend" - configurations.all { - transitive = false// 为本依赖关闭依赖传递特性 - } - //java Version - sourceCompatibility = 17 - targetCompatibility = 17 - compileJava.options.encoding = 'UTF-8' - + configurations.all { + transitive = false// 为本依赖关闭依赖传递特性 + } + //java Version + sourceCompatibility = 17 + targetCompatibility = 17 + compileJava.options.encoding = 'UTF-8' + eclipse { /*设置工程字符集*/ jdt { @@ -91,7 +55,7 @@ allprojects { prefs.append('encoding/=UTF-8') //use UTF-8 } } - } + } } buildscript { @@ -105,28 +69,37 @@ repositories { // Use 'jcenter' for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. mavenCentral() + jcenter() } -// In this section you declare the dependencies for your production and test code -dependencies { - -} -subprojects { - 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/=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"} @@ -143,8 +116,8 @@ subprojects { maven { url "https://repository.apache.org/content/repositories/releases" } mavenCentral() } - - //all dependencies + + //all dependencies dependencies { //for Test and Compile testImplementation group: 'junit', name: 'junit', version: "${junitVersion}" @@ -447,92 +420,38 @@ 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 - ) - } - } - - 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 } -} + 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 + } + + assemble.configure { finalizedBy buildRelease } -//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/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 } } tasks.register("buildRelease") { - 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 } -tasks.register("copyShellScript",Copy) { - println "project copyMaxKeyShellScript ."; - - from "$rootDir/shellscript/" - into "$rootDir/build/MaxKey-v${project.version}GA/shellscript/"; -} +build.configure { finalizedBy buildRelease } -tasks.register("copyWindowsShellScript",Copy) { - println "project copyMaxKeyWindowsShellScript ."; - from "$rootDir/shellscript/windows" - into "$rootDir/build/MaxKey-v${project.version}GA/"; -} - -build.configure { - finalizedBy buildRelease - - println "" - println "Gradle version is ${GradleVersion.current().version}" +// In this section you declare the dependencies for your production and test code +dependencies { + } diff --git a/config/build_jar.gradle b/config/build_tradition.gradle similarity index 85% rename from config/build_jar.gradle rename to config/build_tradition.gradle index bc9a4b0d0..2a806a0f0 100644 --- a/config/build_jar.gradle +++ b/config/build_tradition.gradle @@ -1,5 +1,5 @@ /* - * Copyright [2023] [MaxKey of copyright http://www.maxkey.top] + * Copyright [2024] [MaxKey of copyright http://www.maxkey.top] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,11 +22,50 @@ defaultTasks "clean", "build" //Version define ext { - + } +def libjarsmapper=[ + 'maxkey-authentication-core' :'lib', + 'maxkey-authentication-provider' :'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-starter-captcha' :'lib', + 'maxkey-starter-ip2location' :'lib', + 'maxkey-starter-otp' :'lib', + 'maxkey-starter-sms' :'lib', + 'maxkey-starter-web' :'lib', + + 'maxkey-authentication-social' :'maxkey', + 'maxkey-web-maxkey' :'maxkey', + + 'maxkey-web-mgt' :'maxkey_mgt', + 'maxkey-synchronizer' :'maxkey_mgt', + 'maxkey-synchronizer-activedirectory' :'maxkey_mgt', + 'maxkey-synchronizer-common' :'maxkey_mgt', + 'maxkey-synchronizer-jdbc' :'maxkey_mgt', + 'maxkey-synchronizer-ldap' :'maxkey_mgt', + 'maxkey-synchronizer-dingtalk' :'maxkey_mgt', + 'maxkey-synchronizer-workweixin' :'maxkey_mgt', + 'maxkey-synchronizer-reorgdept' :'maxkey_mgt', + + 'maxkey-web-openapi' :'maxkey_openapi', + 'maxkey-web-api-rest' :'maxkey_openapi', + 'maxkey-web-api-scim' :'maxkey_openapi', +] + configurations.all { - transitive = false// 为本依赖关闭依赖传递特性 + transitive = false// 为本依赖关闭依赖传递特性 } //add support for Java @@ -38,14 +77,14 @@ allprojects { //apply plugin: "findbugs" //apply plugin: "jdepend" - configurations.all { - transitive = false// 为本依赖关闭依赖传递特性 - } - //java Version - sourceCompatibility = 17 - targetCompatibility = 17 - compileJava.options.encoding = 'UTF-8' - + configurations.all { + transitive = false// 为本依赖关闭依赖传递特性 + } + //java Version + sourceCompatibility = 17 + targetCompatibility = 17 + compileJava.options.encoding = 'UTF-8' + eclipse { /*设置工程字符集*/ jdt { @@ -55,7 +94,7 @@ allprojects { prefs.append('encoding/=UTF-8') //use UTF-8 } } - } + } } buildscript { @@ -69,37 +108,28 @@ repositories { // Use 'jcenter' for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. mavenCentral() - jcenter() } +// 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/=UTF-8') //use UTF-8 - } - } - */ - processResources { - from ('src/main/resources') { - include 'src/main/resources/*.*' - } - } - sourceSets { - main { - java { - srcDir 'src/main/java' // 指定源码目录 - } - } - } - - repositories { +subprojects { + 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"} @@ -116,8 +146,8 @@ subprojects { maven { url "https://repository.apache.org/content/repositories/releases" } mavenCentral() } - - //all dependencies + + //all dependencies dependencies { //for Test and Compile testImplementation group: 'junit', name: 'junit', version: "${junitVersion}" @@ -420,38 +450,92 @@ 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 - } - - assemble.configure { finalizedBy buildRelease } + 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/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 } } tasks.register("buildRelease") { + 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 } - -// In this section you declare the dependencies for your production and test code -dependencies { - +tasks.register("copyShellScript",Copy) { + println "project copyMaxKeyShellScript ."; + + from "$rootDir/shellscript/" + into "$rootDir/build/MaxKey-v${project.version}GA/shellscript/"; +} + +tasks.register("copyWindowsShellScript",Copy) { + println "project copyMaxKeyWindowsShellScript ."; + from "$rootDir/shellscript/windows" + into "$rootDir/build/MaxKey-v${project.version}GA/"; +} + +build.configure { + finalizedBy buildRelease + + println "" + println "Gradle version is ${GradleVersion.current().version}" } diff --git a/maxkey-webs/maxkey-web-maxkey/config/build_docker.gradle b/maxkey-webs/maxkey-web-maxkey/config/build_docker.gradle index e9d7a6a7e..43bfa5401 100644 --- a/maxkey-webs/maxkey-web-maxkey/config/build_docker.gradle +++ b/maxkey-webs/maxkey-web-maxkey/config/build_docker.gradle @@ -53,14 +53,16 @@ dependencies { implementation project(":maxkey-core") implementation project(":maxkey-persistence") + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + implementation project(":maxkey-authentications:maxkey-authentication-core") implementation project(":maxkey-authentications:maxkey-authentication-social") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") - + implementation project(":maxkey-protocols:maxkey-protocol-authorize") implementation project(":maxkey-protocols:maxkey-protocol-cas") implementation project(":maxkey-protocols:maxkey-protocol-extendapi") diff --git a/maxkey-webs/maxkey-web-maxkey/config/build_jar.gradle b/maxkey-webs/maxkey-web-maxkey/config/build_jar.gradle deleted file mode 100644 index f336b99bd..000000000 --- a/maxkey-webs/maxkey-web-maxkey/config/build_jar.gradle +++ /dev/null @@ -1,58 +0,0 @@ -buildscript { - repositories { - maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} - } - dependencies { - //springboot jar - classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") - } -} - -plugins { - id 'java' - id "io.spring.dependency-management" version "1.0.11.RELEASE" - id 'org.springframework.boot' version "${springBootVersion}" -} - -apply plugin: 'io.spring.dependency-management' - -description = "maxkey-web-maxkey" - -bootJar { - dependsOn jar - archiveBaseName = 'maxkey-boot' - version = "${project.version}-ga" - mainClass = 'org.dromara.maxkey.MaxKeyApplication' - manifest { - attributes( - "Implementation-Title": project.name, - "Implementation-Vendor": project.vendor, - "Created-By": project.author, - "Implementation-Date": java.time.ZonedDateTime.now(), - "Implementation-Version": project.version - ) - } -} - -dependencies { - implementation project(":maxkey-common") - implementation project(":maxkey-core") - implementation project(":maxkey-persistence") - - implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-social") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") - implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") - - implementation project(":maxkey-protocols:maxkey-protocol-authorize") - implementation project(":maxkey-protocols:maxkey-protocol-cas") - implementation project(":maxkey-protocols:maxkey-protocol-extendapi") - implementation project(":maxkey-protocols:maxkey-protocol-formbased") - implementation project(":maxkey-protocols:maxkey-protocol-tokenbased") - implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") - implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") - implementation project(":maxkey-protocols:maxkey-protocol-jwt") -} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle b/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle index cf4117d3b..fa94514b7 100644 --- a/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle +++ b/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle @@ -1,21 +1,54 @@ +buildscript { + repositories { + maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} + } + dependencies { + //springboot jar + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") + } +} + +plugins { + id 'java' + id "io.spring.dependency-management" version "1.0.11.RELEASE" + id 'org.springframework.boot' version "${springBootVersion}" +} + +apply plugin: 'io.spring.dependency-management' + description = "maxkey-web-maxkey" -//add support for Java -apply plugin: 'java' +bootJar { + dependsOn jar + archiveBaseName = 'maxkey-boot' + version = "${project.version}-ga" + mainClass = 'org.dromara.maxkey.MaxKeyApplication' + manifest { + attributes( + "Implementation-Title": project.name, + "Implementation-Vendor": project.vendor, + "Created-By": project.author, + "Implementation-Date": java.time.ZonedDateTime.now(), + "Implementation-Version": project.version + ) + } +} dependencies { implementation project(":maxkey-common") implementation project(":maxkey-core") implementation project(":maxkey-persistence") + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + implementation project(":maxkey-authentications:maxkey-authentication-core") implementation project(":maxkey-authentications:maxkey-authentication-social") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") - + implementation project(":maxkey-protocols:maxkey-protocol-authorize") implementation project(":maxkey-protocols:maxkey-protocol-cas") implementation project(":maxkey-protocols:maxkey-protocol-extendapi") @@ -24,5 +57,4 @@ dependencies { implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") implementation project(":maxkey-protocols:maxkey-protocol-jwt") - -} +} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-maxkey/config/build_tradition.gradle b/maxkey-webs/maxkey-web-maxkey/config/build_tradition.gradle new file mode 100644 index 000000000..6cf1951ce --- /dev/null +++ b/maxkey-webs/maxkey-web-maxkey/config/build_tradition.gradle @@ -0,0 +1,30 @@ +description = "maxkey-web-maxkey" + +//add support for Java +apply plugin: 'java' + +dependencies { + implementation project(":maxkey-common") + implementation project(":maxkey-core") + implementation project(":maxkey-persistence") + + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + + implementation project(":maxkey-authentications:maxkey-authentication-core") + implementation project(":maxkey-authentications:maxkey-authentication-social") + implementation project(":maxkey-authentications:maxkey-authentication-provider") + + implementation project(":maxkey-protocols:maxkey-protocol-authorize") + implementation project(":maxkey-protocols:maxkey-protocol-cas") + implementation project(":maxkey-protocols:maxkey-protocol-extendapi") + implementation project(":maxkey-protocols:maxkey-protocol-formbased") + implementation project(":maxkey-protocols:maxkey-protocol-tokenbased") + implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") + implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") + implementation project(":maxkey-protocols:maxkey-protocol-jwt") + +} diff --git a/maxkey-webs/maxkey-web-mgt/config/build_docker.gradle b/maxkey-webs/maxkey-web-mgt/config/build_docker.gradle index 21ae30b2c..79fb12cfc 100644 --- a/maxkey-webs/maxkey-web-mgt/config/build_docker.gradle +++ b/maxkey-webs/maxkey-web-mgt/config/build_docker.gradle @@ -53,12 +53,14 @@ dependencies { implementation project(":maxkey-core") implementation project(":maxkey-persistence") + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") diff --git a/maxkey-webs/maxkey-web-mgt/config/build_jar.gradle b/maxkey-webs/maxkey-web-mgt/config/build_jar.gradle deleted file mode 100644 index 59d2765f7..000000000 --- a/maxkey-webs/maxkey-web-mgt/config/build_jar.gradle +++ /dev/null @@ -1,65 +0,0 @@ -buildscript { - repositories { - maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} - } - dependencies { - //springboot jar - classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") - } -} - -plugins { - id 'org.springframework.boot' version "${springBootVersion}" - id "io.spring.dependency-management" version "1.0.11.RELEASE" -} - -description = "maxkey-web-mgt" - -//springboot jar -apply plugin: 'io.spring.dependency-management' - -//add support for Java -apply plugin: 'java' - - - -bootJar { - dependsOn jar - archiveBaseName = 'maxkey-mgt-boot' - version = "${project.version}-ga" - mainClass = 'org.dromara.maxkey.MaxKeyMgtApplication' - manifest { - attributes( - "Implementation-Title": project.name, - "Implementation-Vendor": project.vendor, - "Created-By": project.author, - "Implementation-Date": java.time.ZonedDateTime.now(), - "Implementation-Version": project.version - ) - } -} - -dependencies { - implementation project(":maxkey-common") - implementation project(":maxkey-core") - implementation project(":maxkey-persistence") - - implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") - implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") - - implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") - implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") - - //synchronizers - implementation project(":maxkey-synchronizers:maxkey-synchronizer") - implementation project(":maxkey-synchronizers:maxkey-synchronizer-activedirectory") - implementation project(":maxkey-synchronizers:maxkey-synchronizer-feishu") - implementation project(":maxkey-synchronizers:maxkey-synchronizer-jdbc") - implementation project(":maxkey-synchronizers:maxkey-synchronizer-ldap") - implementation project(":maxkey-synchronizers:maxkey-synchronizer-workweixin") - implementation project(":maxkey-synchronizers:maxkey-synchronizer-dingtalk") -} diff --git a/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle b/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle index 82f4c644f..bd8fff0df 100644 --- a/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle +++ b/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle @@ -1,19 +1,57 @@ +buildscript { + repositories { + maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} + } + dependencies { + //springboot jar + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") + } +} + +plugins { + id 'org.springframework.boot' version "${springBootVersion}" + id "io.spring.dependency-management" version "1.0.11.RELEASE" +} + description = "maxkey-web-mgt" +//springboot jar +apply plugin: 'io.spring.dependency-management' + //add support for Java apply plugin: 'java' + + +bootJar { + dependsOn jar + archiveBaseName = 'maxkey-mgt-boot' + version = "${project.version}-ga" + mainClass = 'org.dromara.maxkey.MaxKeyMgtApplication' + manifest { + attributes( + "Implementation-Title": project.name, + "Implementation-Vendor": project.vendor, + "Created-By": project.author, + "Implementation-Date": java.time.ZonedDateTime.now(), + "Implementation-Version": project.version + ) + } +} + dependencies { implementation project(":maxkey-common") implementation project(":maxkey-core") implementation project(":maxkey-persistence") + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") @@ -26,4 +64,4 @@ dependencies { implementation project(":maxkey-synchronizers:maxkey-synchronizer-ldap") implementation project(":maxkey-synchronizers:maxkey-synchronizer-workweixin") implementation project(":maxkey-synchronizers:maxkey-synchronizer-dingtalk") -} \ No newline at end of file +} diff --git a/maxkey-webs/maxkey-web-mgt/config/build_tradition.gradle b/maxkey-webs/maxkey-web-mgt/config/build_tradition.gradle new file mode 100644 index 000000000..a3105840c --- /dev/null +++ b/maxkey-webs/maxkey-web-mgt/config/build_tradition.gradle @@ -0,0 +1,31 @@ +description = "maxkey-web-mgt" + +//add support for Java +apply plugin: 'java' + +dependencies { + implementation project(":maxkey-common") + implementation project(":maxkey-core") + implementation project(":maxkey-persistence") + + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + + implementation project(":maxkey-authentications:maxkey-authentication-core") + implementation project(":maxkey-authentications:maxkey-authentication-provider") + + implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") + implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") + + //synchronizers + implementation project(":maxkey-synchronizers:maxkey-synchronizer") + implementation project(":maxkey-synchronizers:maxkey-synchronizer-activedirectory") + implementation project(":maxkey-synchronizers:maxkey-synchronizer-feishu") + implementation project(":maxkey-synchronizers:maxkey-synchronizer-jdbc") + implementation project(":maxkey-synchronizers:maxkey-synchronizer-ldap") + implementation project(":maxkey-synchronizers:maxkey-synchronizer-workweixin") + implementation project(":maxkey-synchronizers:maxkey-synchronizer-dingtalk") +} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-openapi/config/build_docker.gradle b/maxkey-webs/maxkey-web-openapi/config/build_docker.gradle index 0fbff1ff9..bfd9f43b3 100644 --- a/maxkey-webs/maxkey-web-openapi/config/build_docker.gradle +++ b/maxkey-webs/maxkey-web-openapi/config/build_docker.gradle @@ -53,12 +53,14 @@ dependencies { implementation project(":maxkey-core") implementation project(":maxkey-persistence") + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") diff --git a/maxkey-webs/maxkey-web-openapi/config/build_jar.gradle b/maxkey-webs/maxkey-web-openapi/config/build_jar.gradle deleted file mode 100644 index 1cc3ff3fa..000000000 --- a/maxkey-webs/maxkey-web-openapi/config/build_jar.gradle +++ /dev/null @@ -1,60 +0,0 @@ -buildscript { - repositories { - maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} - } - dependencies { - //springboot jar - classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") - } -} - -plugins { - id 'org.springframework.boot' version "${springBootVersion}" - id "io.spring.dependency-management" version "1.0.11.RELEASE" -} - -description = "maxkey-web-openapi" - -//springboot jar -apply plugin: 'io.spring.dependency-management' - -//add support for Java -apply plugin: 'java' - - - -bootJar { - dependsOn jar - archiveBaseName = 'maxkey-openapi-boot' - version = "${project.version}-ga" - mainClass = 'org.dromara.maxkey.MaxKeyOpenApiApplication' - manifest { - attributes( - "Implementation-Title": project.name, - "Implementation-Vendor": project.vendor, - "Created-By": project.author, - "Implementation-Date": java.time.ZonedDateTime.now(), - "Implementation-Version": project.version - ) - } -} - -dependencies { - implementation project(":maxkey-common") - implementation project(":maxkey-core") - implementation project(":maxkey-persistence") - - implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") - implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") - - implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") - implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") - - //webapis - implementation project(":maxkey-web-apis:maxkey-web-api-scim") - implementation project(":maxkey-web-apis:maxkey-web-api-rest") -} diff --git a/maxkey-webs/maxkey-web-openapi/config/build_standard.gradle b/maxkey-webs/maxkey-web-openapi/config/build_standard.gradle index 8ee001600..d1197f61d 100644 --- a/maxkey-webs/maxkey-web-openapi/config/build_standard.gradle +++ b/maxkey-webs/maxkey-web-openapi/config/build_standard.gradle @@ -1,25 +1,62 @@ +buildscript { + repositories { + maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} + } + dependencies { + //springboot jar + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") + } +} + +plugins { + id 'org.springframework.boot' version "${springBootVersion}" + id "io.spring.dependency-management" version "1.0.11.RELEASE" +} + description = "maxkey-web-openapi" +//springboot jar +apply plugin: 'io.spring.dependency-management' + //add support for Java apply plugin: 'java' + + +bootJar { + dependsOn jar + archiveBaseName = 'maxkey-openapi-boot' + version = "${project.version}-ga" + mainClass = 'org.dromara.maxkey.MaxKeyOpenApiApplication' + manifest { + attributes( + "Implementation-Title": project.name, + "Implementation-Vendor": project.vendor, + "Created-By": project.author, + "Implementation-Date": java.time.ZonedDateTime.now(), + "Implementation-Version": project.version + ) + } +} + dependencies { implementation project(":maxkey-common") implementation project(":maxkey-core") implementation project(":maxkey-persistence") + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + implementation project(":maxkey-authentications:maxkey-authentication-core") - implementation project(":maxkey-authentications:maxkey-authentication-captcha") - implementation project(":maxkey-authentications:maxkey-authentication-ip2location") - implementation project(":maxkey-authentications:maxkey-authentication-otp") implementation project(":maxkey-authentications:maxkey-authentication-provider") - implementation project(":maxkey-authentications:maxkey-authentication-sms") implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") //webapis implementation project(":maxkey-web-apis:maxkey-web-api-scim") - implementation project(":maxkey-web-apis:maxkey-web-api-rest") - -} \ No newline at end of file + implementation project(":maxkey-web-apis:maxkey-web-api-rest") +} diff --git a/maxkey-webs/maxkey-web-openapi/config/build_tradition.gradle b/maxkey-webs/maxkey-web-openapi/config/build_tradition.gradle new file mode 100644 index 000000000..ae073c830 --- /dev/null +++ b/maxkey-webs/maxkey-web-openapi/config/build_tradition.gradle @@ -0,0 +1,27 @@ +description = "maxkey-web-openapi" + +//add support for Java +apply plugin: 'java' + +dependencies { + implementation project(":maxkey-common") + implementation project(":maxkey-core") + implementation project(":maxkey-persistence") + + implementation project(":maxkey-starter:maxkey-starter-captcha") + implementation project(":maxkey-starter:maxkey-starter-ip2location") + implementation project(":maxkey-starter:maxkey-starter-otp") + implementation project(":maxkey-starter:maxkey-starter-sms") + implementation project(":maxkey-starter:maxkey-starter-web") + + implementation project(":maxkey-authentications:maxkey-authentication-core") + implementation project(":maxkey-authentications:maxkey-authentication-provider") + + implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0") + implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0") + + //webapis + implementation project(":maxkey-web-apis:maxkey-web-api-scim") + implementation project(":maxkey-web-apis:maxkey-web-api-rest") + +} \ No newline at end of file diff --git a/release_cnf_standard.bat b/release_cnf_standard.bat index feb41d1f9..d5a2175bc 100644 --- a/release_cnf_standard.bat +++ b/release_cnf_standard.bat @@ -3,8 +3,6 @@ call setEnvVars.bat set START_TIME="%date:~0,10% %time:~0,2%:%time:~3,5%" echo start time %START_TIME% -call %GRADLE_HOME%/bin/gradle configStd -b build_cnf.gradle +call %GRADLE_HOME%/bin/gradle configStandard -b build_cnf.gradle - -#pause pause \ No newline at end of file diff --git a/release_cnf_jar.bat b/release_cnf_tradition.bat similarity index 59% rename from release_cnf_jar.bat rename to release_cnf_tradition.bat index 29451202d..88f4beab8 100644 --- a/release_cnf_jar.bat +++ b/release_cnf_tradition.bat @@ -3,6 +3,8 @@ call setEnvVars.bat set START_TIME="%date:~0,10% %time:~0,2%:%time:~3,5%" echo start time %START_TIME% -call %GRADLE_HOME%/bin/gradle configJar -b build_cnf.gradle +call %GRADLE_HOME%/bin/gradle configTradition -b build_cnf.gradle + +#pause pause \ No newline at end of file