Compare commits

..

No commits in common. "main" and "groovyDSL" have entirely different histories.

26 changed files with 245 additions and 858 deletions

1
.gitattributes vendored
View File

@ -16,3 +16,4 @@
*.js linguist-language=Java
*.css linguist-language=Java
*.html linguist-language=Java

1
.gitignore vendored
View File

@ -54,3 +54,4 @@ node_modules/
auto-imports.d.ts
.flattened-pom.xml

View File

@ -1,30 +1,6 @@
org.gradle.caching=true
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8
org.gradle.caching=true
testsEnabled=false
Y9_VERSION=v9.7.0-SNAPSHOT
Y9BOM_VERSION=9.7.0
PROJECT_GIT_URL=https://github.com/risesoft-y9/Digital-Infrastructure
PROJECT_SCM_URL=scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git
#### 从 Sonatype 官方获取的 Publisher API 调用的 token应为 Base64 编码后的 username:password
#### tech.yanand.maven-central-publish用到mavenCentralAuthToken变量
# mavenCentralAuthToken=
#### signing plugin用到以下变量
# signingInMemoryKey=\
# signingInMemoryKeyId=
# signingInMemoryKeyPassword=
#### jrelaser plugin用到以下变量
# mavenCentralUsername=
# mavenCentralPassword=
#### Y9NEXUS仓库的帐号
# mavenUsername=
# mavenPassword=
#### Y9NEXUS DOCKER仓库的帐号
# dockerUsername=
# dockerPassword=@

View File

@ -1,161 +1,2 @@
[versions]
y9-version = "9.7.0-SNAPSHOT"
# spring boot & cloud bom
spring-boot = "3.4.0"
spring-cloud = "2023.0.3"
io-spring-dependency-management = "1.1.6"
# cas server bom
cas-server-bom = "7.1.2"
# oracle bom
ojdbc-bom = "23.6.0.24.10"
# hutool
cn-hutool-hutool-all = "5.8.27"
# alibaba
spring-cloud-alibaba = "2023.0.1.3"
alibaba-transmittable-thread-local = "2.14.5"
# 人大金仓
cn-com-kingbase-kesdialect-for-hibernate4 = "1.0.0"
cn-com-kingbase-kingbase8 = "8.6.1"
# 达梦数据库
com-dameng = "8.1.3.140"
# hibernate
org-hibernate-orm-hibernate-ant = "6.5.2.Final"
org-hibernate-orm-hibernate-core = "6.4.1.Final"
org-hibernate-validator-hibernate-validator = "8.0.1.Final"
# fasterxml
java-uuid-generator = "5.1.0"
# google
com-google-code-gson-gson = "2.10.1"
com-google-guava-guava = "33.1.0-jre"
com-google-zxing-core = "3.5.2"
com-googlecode-cqengine-cqengine = "3.6.0"
# apache common
commons-beanutils-commons-beanutils = "1.9.4"
commons-codec-commons-codec = "1.16.1"
commons-httpclient-commons-httpclient = "3.1"
commons-io-commons-io = "2.13.0"
commons-net-commons-net = "3.10.0"
org-apache-commons-commons-lang3 = "3.13.0"
org-apache-commons-commons-pool2 = "2.12.0"
org-apache-httpcomponents-httpclient = "4.5.13"
org-apache-httpcomponents-httpmime = "4.5.14"
org-apache-poi-poi-scratchpad = "5.2.3"
# xml
jaxen-jaxen = "2.0.0"
org-dom4j-dom4j = "2.1.4"
# jdbc
com-h2database-h2 = "2.2.224"
com-mysql-mysql-connector-j = "8.2.0"
com-oceanbase-oceanbase-client = "2.4.12"
org-mariadb-jdbc-mariadb-java-client = "3.5.0"
org-postgresql-postgresql = "42.7.3"
# javers
org-javers-javers-spring-boot-starter-sql = "7.4.2"
org-jodd-jodd-http = "6.3.0"
#liquibase
org-liquibase-liquibase-core = "4.27.0"
# jxls
org-jxls-jxls = "2.13.0"
org-jxls-jxls-jexcel = "1.0.9"
org-jxls-jxls-poi = "2.13.0"
org-jxls-jxls-reader = "2.1.0"
# 其他
com-ibm-etcd-etcd-java = "0.0.18"
com-redis-lettucemod = "3.7.3"
com-twelvemonkeys-imageio-imageio-jpeg = "3.9.3"
# 浏览器UA字符串解析
cz-mallat-uasparser-uasparser = "0.6.2"
# 类反射
io-github-bruce0203-reflections = "0.10.3.4"
io-github-classgraph-classgraph = "4.8.162"
# prometheus
io-micrometer-micrometer-registry-prometheus = "1.13.3"
# 安全相关
de-svenkubiak-jbcrypt = "0.4.3"
net-javacrumbs-shedlock-shedlock-spring = "5.13.0"
org-bouncycastle-bcprov-ext-jdk18on = "1.78.1"
org-imgscalr-imgscalr-lib = "4.2"
org-owasp-antisamy-antisamy = "1.6.2"
[libraries]
#spring boot & cloud dependencies
spring-boot-bom = { group = "org.springframework.boot", name = "spring-boot-dependencies", version.ref = "spring-boot" }
spring-cloud-bom = { group = "org.springframework.cloud", name = "spring-cloud-dependencies", version.ref = "spring-cloud" }
#cas server bom
cas-server-bom = { module = "org.apereo.cas:cas-server-support-bom", version.ref = "cas-server-bom" }
#alibaba
spring-cloud-alibaba-bom = { group = "com.alibaba.cloud", name = "spring-cloud-alibaba-dependencies", version.ref = "spring-cloud-alibaba" }
alibaba-transmittable-thread-local = { module = "com.alibaba:transmittable-thread-local", version.ref = "alibaba-transmittable-thread-local" }
hutool-all = { module = "cn.hutool:hutool-all", version.ref = "cn-hutool-hutool-all" }
commons-beanutils = { module = "commons-beanutils:commons-beanutils", version.ref = "commons-beanutils-commons-beanutils" }
commons-codec = { module = "commons-codec:commons-codec", version.ref = "commons-codec-commons-codec" }
commons-httpclient = { module = "commons-httpclient:commons-httpclient", version.ref = "commons-httpclient-commons-httpclient" }
commons-io = { module = "commons-io:commons-io", version.ref = "commons-io-commons-io" }
commons-net = { module = "commons-net:commons-net", version.ref = "commons-net-commons-net" }
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "org-apache-commons-commons-lang3" }
commons-pool2 = { module = "org.apache.commons:commons-pool2", version.ref = "org-apache-commons-commons-pool2" }
httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents-httpclient" }
httpcomponents-httpmime = { module = "org.apache.httpcomponents:httpmime", version.ref = "org-apache-httpcomponents-httpmime" }
jbcrypt = { module = "de.svenkubiak:jBCrypt", version.ref = "de-svenkubiak-jbcrypt" }
bcprov-ext-jdk18on = { module = "org.bouncycastle:bcprov-ext-jdk18on", version.ref = "org-bouncycastle-bcprov-ext-jdk18on" }
jxls = { module = "org.jxls:jxls", version.ref = "org-jxls-jxls" }
jxls-jexcel = { module = "org.jxls:jxls-jexcel", version.ref = "org-jxls-jxls-jexcel" }
jxls-poi = { module = "org.jxls:jxls-poi", version.ref = "org-jxls-jxls-poi" }
jxls-reader = { module = "org.jxls:jxls-reader", version.ref = "org-jxls-jxls-reader" }
poi-scratchpad = { module = "org.apache.poi:poi-scratchpad", version.ref = "org-apache-poi-poi-scratchpad" }
java-uuid-generator = { module = "com.fasterxml.uuid:java-uuid-generator", version.ref = "java-uuid-generator" }
# database
ojdbc-bom = { module = "com.oracle.database.jdbc:ojdbc-bom", version.ref = "ojdbc-bom" }
kingbase-kesdialect-hibernate4 = { module = "cn.com.kingbase:KesDialect-for-hibernate4", version.ref = "cn-com-kingbase-kesdialect-for-hibernate4" }
kingbase-kingbase8 = { module = "cn.com.kingbase:kingbase8", version.ref = "cn-com-kingbase-kingbase8" }
dameng-dmdialect-hibernate62 = { module = "com.dameng:DmDialect-for-hibernate6.2", version.ref = "com-dameng" }
dameng-dmjdbcdriver18 = { module = "com.dameng:DmJdbcDriver18", version.ref = "com-dameng" }
h2database = { module = "com.h2database:h2", version.ref = "com-h2database-h2" }
mysql-connector-j = { module = "com.mysql:mysql-connector-j", version.ref = "com-mysql-mysql-connector-j" }
oceanbase-client = { module = "com.oceanbase:oceanbase-client", version.ref = "com-oceanbase-oceanbase-client" }
google-gson = { module = "com.google.code.gson:gson", version.ref = "com-google-code-gson-gson" }
google-guava = { module = "com.google.guava:guava", version.ref = "com-google-guava-guava" }
google-zxing-core = { module = "com.google.zxing:core", version.ref = "com-google-zxing-core" }
googlecode-cqengine = { module = "com.googlecode.cqengine:cqengine", version.ref = "com-googlecode-cqengine-cqengine" }
etcd-java = { module = "com.ibm.etcd:etcd-java", version.ref = "com-ibm-etcd-etcd-java" }
lettucemod = { module = "com.redis:lettucemod", version.ref = "com-redis-lettucemod" }
imageio-jpeg = { module = "com.twelvemonkeys.imageio:imageio-jpeg", version.ref = "com-twelvemonkeys-imageio-imageio-jpeg" }
uasparser = { module = "cz.mallat.uasparser:uasparser", version.ref = "cz-mallat-uasparser-uasparser" }
reflections = { module = "io.github.bruce0203:reflections", version.ref = "io-github-bruce0203-reflections" }
classgraph = { module = "io.github.classgraph:classgraph", version.ref = "io-github-classgraph-classgraph" }
micrometer-registry-prometheus = { module = "io.micrometer:micrometer-registry-prometheus", version.ref = "io-micrometer-micrometer-registry-prometheus" }
jaxen = { module = "jaxen:jaxen", version.ref = "jaxen-jaxen" }
shedlock-spring = { module = "net.javacrumbs.shedlock:shedlock-spring", version.ref = "net-javacrumbs-shedlock-shedlock-spring" }
shedlock-provider-jdbc-template = { module = "net.javacrumbs.shedlock:shedlock-provider-jdbc-template", version.ref = "net-javacrumbs-shedlock-shedlock-spring" }
dom4j = { module = "org.dom4j:dom4j", version.ref = "org-dom4j-dom4j" }
hibernate-ant = { module = "org.hibernate.orm:hibernate-ant", version.ref = "org-hibernate-orm-hibernate-ant" }
hibernate-core = { module = "org.hibernate.orm:hibernate-core", version.ref = "org-hibernate-orm-hibernate-core" }
hibernate-validator = { module = "org.hibernate.validator:hibernate-validator", version.ref = "org-hibernate-validator-hibernate-validator" }
imgscalr-lib = { module = "org.imgscalr:imgscalr-lib", version.ref = "org-imgscalr-imgscalr-lib" }
javers-spring-boot-starter-sql = { module = "org.javers:javers-spring-boot-starter-sql", version.ref = "org-javers-javers-spring-boot-starter-sql" }
jodd-http = { module = "org.jodd:jodd-http", version.ref = "org-jodd-jodd-http" }
liquibase-core = { module = "org.liquibase:liquibase-core", version.ref = "org-liquibase-liquibase-core" }
mariadb-java-client = { module = "org.mariadb.jdbc:mariadb-java-client", version.ref = "org-mariadb-jdbc-mariadb-java-client" }
antisamy = { module = "org.owasp.antisamy:antisamy", version.ref = "org-owasp-antisamy-antisamy" }
postgresql = { module = "org.postgresql:postgresql", version.ref = "org-postgresql-postgresql" }
[plugins]
io-spring-dependency-management = { id = "io.spring.dependency-management", version.ref = "io-spring-dependency-management" }
org-springframework-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@ -1,81 +0,0 @@
import com.vanniktech.maven.publish.GradlePlugin
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.SonatypeHost
plugins {
`kotlin-dsl`
`maven-publish`
signing
id("com.vanniktech.maven.publish") version "0.30.0"
}
dependencies {
implementation("com.google.cloud.tools:jib-gradle-plugin:3.4.4")
implementation("com.ly.smart-doc:smart-doc-gradle-plugin:3.0.8")
implementation("io.freefair.gradle:aspectj-plugin:8.11")
implementation("io.freefair.gradle:lombok-plugin:8.11")
implementation("tech.yanand.gradle:maven-central-publish:1.3.0")
implementation("com.vanniktech:gradle-maven-publish-plugin:0.30.0")
}
repositories {
mavenCentral()
gradlePluginPortal()
}
group = "net.risesoft.y9"
version = "9.7.0"
signing {
//useGpgCmd()
val signingInMemoryKey: String? by project
val signingInMemoryKeyId: String? by project
val signingInMemoryKeyPassword: String? by project
useInMemoryPgpKeys(signingInMemoryKeyId, signingInMemoryKey, signingInMemoryKeyPassword)
sign(publishing.publications)
}
mavenPublishing {
configure(GradlePlugin(
javadocJar = JavadocJar.Javadoc(),
sourcesJar = true,
))
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = false)
signAllPublications()
coordinates(project.group.toString(), project.name, project.version.toString())
pom {
name = project.name
description = project.name
url = "https://github.com/risesoft-y9/Digital-Infrastructure"
licenses {
license {
name = "GNU General Public License (GPL) version 3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
name = "dingzhaojun"
email = "dingzhaojun@risesoft.net"
}
developer {
name = "qinman"
email = "qinman@risesoft.net"
}
developer {
name = "mengjuhua"
email = "mengjuhua@risesoft.net"
}
developer {
name = "shidaobang"
email = "shidaobang@risesoft.net"
}
}
scm {
connection = "scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git"
developerConnection = "scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git"
url = "https://github.com/risesoft-y9/Digital-Infrastructure"
}
}
}

View File

@ -1,37 +0,0 @@
import io.freefair.gradle.plugins.aspectj.AjcAction
plugins {
id("java-library")
id("io.freefair.aspectj.post-compile-weaving")
}
dependencies {
api("org.aspectj:aspectjrt")
api("org.aspectj:aspectjtools")
api("org.aspectj:aspectjweaver")
aspect("org.springframework:spring-aspects")
testAspect("org.springframework:spring-aspects")
}
tasks.named("compileJava") {
configure<AjcAction> {
enabled = true
classpath
options {
aspectpath.setFrom(configurations.aspect)
compilerArgs = listOf("-showWeaveInfo", "-verbose")
}
}
}
tasks.named("compileTestJava") {
configure<AjcAction> {
enabled = true
classpath
options {
aspectpath.setFrom(configurations.aspect)
compilerArgs = listOf("-showWeaveInfo", "-verbose")
}
}
}

View File

@ -1,35 +0,0 @@
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
id("application")
id("com.google.cloud.tools.jib")
}
val myDateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm")
val dateTimeStr = myDateTimeFormatter.format(LocalDateTime.now())
println("dateTimeStr" + dateTimeStr)
jib {
from {
image = "docker-internal.youshengyun.com/tomcat:10.1-jre21-temurin"
platforms {
platform {
architecture = "amd64"
os = "linux"
}
platform {
architecture = "arm64"
os = "linux"
}
}
}
to {
image = "docker-registry-internal.youshengyun.com/${project.name}"
auth {
username = findProperty("dockerUsername").toString()
password = findProperty("dockerPassword").toString()
}
tags = setOf("v9.7.0-SNAPSHOT", "v9.7.x", "v9.7.0-SNAPSHOT-${dateTimeStr}")
}
}

View File

@ -1,51 +0,0 @@
plugins {
id("java-library")
id("net.risesoft.y9.management")
id("net.risesoft.y9.java-publish")
}
group = "net.risesoft"
version = findProperty("Y9_VERSION").toString()
java {
sourceCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withJavadocJar()
withSourcesJar()
}
tasks.withType<JavaCompile> {
//sourceCompatibility = JavaVersion.VERSION_21.toString()
//targetCompatibility = JavaVersion.VERSION_21.toString()
options.encoding = "UTF-8"
val compilerArgs = options.compilerArgs
compilerArgs.add("-parameters")
compilerArgs.add("-Xlint:all")
compilerArgs.add("-Xdiags:verbose")
}
tasks.withType<Javadoc> {
//enabled = false
isFailOnError = false
val doclet = options as StandardJavadocDocletOptions
doclet.encoding = "UTF-8"
doclet.docEncoding = "UTF-8"
doclet.addBooleanOption("html5", true)
//doclet.addStringOption("Xdoclint:all,-missing", "-quiet")
doclet.addStringOption("Xdoclint:none", "-quiet") // 禁用所有文档检查
}
tasks.test {
useJUnitPlatform()
//exclude("**/*")
}
tasks.withType<Test> { // OR tasks.test {
onlyIf {
properties["testsEnabled"].toString().toBoolean()
}
//enabled = false
}

View File

@ -1,16 +0,0 @@
plugins {
id("net.risesoft.y9.java-publish")
id("tech.yanand.maven-central-publish")
}
mavenCentral {
// 从 Sonatype 官方获取的 Publisher API 调用的 token应为 Base64 编码后的 username:password
authToken = findProperty("mavenCentralAuthToken").toString()
// 上传是否应该自动发布。如果您希望手动执行此操作,请使用 'USER_MANAGED'。
// 该属性是可选的,默认为 'AUTOMATIC'。
publishingType = "AUTOMATIC"
// 当发布类型为 'AUTOMATIC' 时状态API获取 'PUBLISHING' 或 'PUBLISHED' 状态的最大等待时间
// 或者当发布类型为 'USER_MANAGED' 时,获取 'VALIDATED' 状态。
// 该属性是可选的默认为60秒。
maxWait = 60
}

View File

@ -1,85 +0,0 @@
import gradle.kotlin.dsl.accessors._7b186f4cc9ec3db7e784e2bd695d97b7.publishing
import gradle.kotlin.dsl.accessors._7b186f4cc9ec3db7e784e2bd695d97b7.signing
plugins {
`maven-publish`
signing
java
`java-library`
id("net.risesoft.y9.repository")
}
group = "net.risesoft"
version = findProperty("Y9_VERSION").toString()
publishing {
publications {
repositories {
maven {
name = "mavenStaging"
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
maven {
name = "y9nexus"
val releasesRepoUrl = uri("https://svn.youshengyun.com:9900/nexus/repository/maven-releases/")
val snapshotsRepoUrl = uri("https://svn.youshengyun.com:9900/nexus/repository/maven-snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = findProperty("mavenUsername") as String? ?: ""
password = findProperty("mavenPassword") as String? ?: ""
}
}
}
create<MavenPublication>("mavenJava") {
from(components["java"])
artifactId = project.name
pom {
// 设置打包类型为pom
//packaging = "pom"
name = project.name
description = "RiseSoft/Digital Infrastructure " + project.name
url = findProperty("PROJECT_GIT_URL").toString()
licenses {
license {
name = "GNU General Public License (GPL) version 3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
name = "dingzhaojun"
email = "dingzhaojun@risesoft.net"
}
developer {
name = "qinman"
email = "qinman@risesoft.net"
}
developer {
name = "mengjuhua"
email = "mengjuhua@risesoft.net"
}
developer {
name = "shidaobang"
email = "shidaobang@risesoft.net"
}
}
scm {
connection = findProperty("PROJECT_SCM_URL").toString()
developerConnection = findProperty("PROJECT_SCM_URL").toString()
url = findProperty("PROJECT_GIT_URL").toString()
}
}
}
}
}
signing {
//useGpgCmd()
val signingInMemoryKey: String? by project
val signingInMemoryKeyId: String? by project
val signingInMemoryKeyPassword: String? by project
useInMemoryPgpKeys(signingInMemoryKeyId, signingInMemoryKey, signingInMemoryKeyPassword)
sign(publishing.publications["mavenJava"])
}

View File

@ -1,16 +0,0 @@
plugins {
id("net.risesoft.y9.javaPlatform-publish")
id("tech.yanand.maven-central-publish")
}
mavenCentral {
// 从 Sonatype 官方获取的 Publisher API 调用的 token应为 Base64 编码后的 username:password
authToken = findProperty("mavenCentralAuthToken").toString()
// 上传是否应该自动发布。如果您希望手动执行此操作,请使用 'USER_MANAGED'。
// 该属性是可选的,默认为 'AUTOMATIC'。
publishingType = "AUTOMATIC"
// 当发布类型为 'AUTOMATIC' 时状态API获取 'PUBLISHING' 或 'PUBLISHED' 状态的最大等待时间
// 或者当发布类型为 'USER_MANAGED' 时,获取 'VALIDATED' 状态。
// 该属性是可选的默认为60秒。
maxWait = 60
}

View File

@ -1,84 +0,0 @@
plugins {
`maven-publish`
signing
`java-platform`
id("net.risesoft.y9.repository")
}
group = "net.risesoft"
version = findProperty("Y9_VERSION").toString()
publishing {
publications {
repositories {
maven {
// jreleaser plugin using this repo
name = "mavenStaging"
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
maven {
name = "y9nexus"
val releasesRepoUrl = uri("https://svn.youshengyun.com:9900/nexus/repository/maven-releases/")
val snapshotsRepoUrl = uri("https://svn.youshengyun.com:9900/nexus/repository/maven-snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = findProperty("mavenUsername") as String? ?: ""
password = findProperty("mavenPassword") as String? ?: ""
}
}
}
create<MavenPublication>("mavenJavaPlatform") {
from(components["javaPlatform"])
artifactId = project.name
pom {
// 设置打包类型为pom
packaging = "pom"
name = project.name
description = "RiseSoft/Digital Infrastructure " + project.name
url = findProperty("PROJECT_GIT_URL").toString()
licenses {
license {
name = "GNU General Public License (GPL) version 3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
name = "dingzhaojun"
email = "dingzhaojun@risesoft.net"
}
developer {
name = "qinman"
email = "qinman@risesoft.net"
}
developer {
name = "mengjuhua"
email = "mengjuhua@risesoft.net"
}
developer {
name = "shidaobang"
email = "shidaobang@risesoft.net"
}
}
scm {
connection = findProperty("PROJECT_SCM_URL").toString()
developerConnection = findProperty("PROJECT_SCM_URL").toString()
url = findProperty("PROJECT_GIT_URL").toString()
}
}
}
}
}
signing {
//useGpgCmd()
val signingInMemoryKey: String? by project
val signingInMemoryKeyId: String? by project
val signingInMemoryKeyPassword: String? by project
useInMemoryPgpKeys(signingInMemoryKeyId, signingInMemoryKey, signingInMemoryKeyPassword)
sign(publishing.publications["mavenJavaPlatform"])
}

View File

@ -1,7 +0,0 @@
plugins {
id("io.freefair.lombok")
}
lombok {
version = "1.18.34"
}

View File

@ -1,58 +0,0 @@
val management = configurations.create("management")
val provided = configurations.create("provided")
val optional = configurations.create("optional")
configurations.named("management") {
isVisible = false
isCanBeResolved = false
isCanBeConsumed = false
}
plugins.withType<JavaPlugin> {
configurations.getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
configurations.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
configurations.getByName(JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME).extendsFrom(management);
configurations.getByName(JavaPlugin.TEST_ANNOTATION_PROCESSOR_CONFIGURATION_NAME).extendsFrom(management);
configurations.getByName(JavaPlugin.TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
configurations.getByName(JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
};
plugins.withType<WarPlugin> {
configurations.getByName("providedCompile").extendsFrom(management);
configurations.getByName("providedRuntime").extendsFrom(management);
}
plugins.withType<JavaTestFixturesPlugin> {
configurations.getByName("testFixturesCompileClasspath").extendsFrom(management);
configurations.getByName("testFixturesRuntimeClasspath").extendsFrom(management);
}
tasks.named<Javadoc>(JavaPlugin.JAVADOC_TASK_NAME) {
classpath = classpath.plus(provided).plus(optional)
}
configurations.named("provided") {
extendsFrom(configurations.getByName("implementation"))
plugins.withType<JavaLibraryPlugin> {
extendsFrom(configurations.getByName("api"))
}
extendsFrom(management)
}
configurations.named("optional") {
extendsFrom(configurations.getByName("implementation"))
plugins.withType<JavaLibraryPlugin> {
extendsFrom(configurations.getByName("api"))
}
extendsFrom(management)
}
val java = project.extensions.getByType<JavaPluginExtension>()
java.sourceSets.forEach { t ->
t.compileClasspath += optional.plus(provided)
t.runtimeClasspath += optional.plus(provided)
}
//val dependency = project.dependencies.platform(project.dependencies.project(":y9-digitalbase-dependencies"))
//val dependency = project.dependencies.platform("net.risesoft.y9:y9-digitalbase-dependencies:0.0.1")
//management.dependencies.add(dependency)

View File

@ -1,36 +0,0 @@
group = "net.risesoft"
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven {
url = uri("https://maven.aliyun.com/repository/public")
}
maven {
url = uri("https://svn.youshengyun.com:9900/nexus/repository/maven-public/")
}
maven {
url = uri("https://repo.spring.io/snapshot")
}
maven {
url = uri("https://repo.spring.io/milestone")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
maven {
url = uri("https://build.shibboleth.net/maven/releases/")
}
maven {
url = uri("https://build.shibboleth.net/maven/snapshots/")
}
}

View File

@ -1,8 +0,0 @@
plugins {
id("com.ly.smart-doc")
}
smartdoc {
configFile = file("src/main/resources/smart-doc.json")
include("net.risesoft*")
}

View File

@ -1,73 +0,0 @@
import com.vanniktech.maven.publish.SonatypeHost
import com.vanniktech.maven.publish.VersionCatalog
plugins {
signing
`version-catalog`
id("com.vanniktech.maven.publish") version "0.30.0"
}
repositories {
mavenCentral()
gradlePluginPortal()
}
catalog {
versionCatalog {
from(files("../gradle/libs.versions.toml"))
}
}
group = "net.risesoft.y9"
version = "9.7.0"
signing {
//useGpgCmd()
val signingInMemoryKey: String? by project
val signingInMemoryKeyId: String? by project
val signingInMemoryKeyPassword: String? by project
useInMemoryPgpKeys(signingInMemoryKeyId, signingInMemoryKey, signingInMemoryKeyPassword)
sign(publishing.publications)
}
mavenPublishing {
configure(VersionCatalog())
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = false)
signAllPublications()
coordinates(project.group.toString(), project.name, project.version.toString())
pom {
name = project.name
description = project.name
url = "https://github.com/risesoft-y9/Digital-Infrastructure"
licenses {
license {
name = "GNU General Public License (GPL) version 3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
name = "dingzhaojun"
email = "dingzhaojun@risesoft.net"
}
developer {
name = "qinman"
email = "qinman@risesoft.net"
}
developer {
name = "mengjuhua"
email = "mengjuhua@risesoft.net"
}
developer {
name = "shidaobang"
email = "shidaobang@risesoft.net"
}
}
scm {
connection = "scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git"
developerConnection = "scm:git:https://github.com/risesoft-y9/Digital-Infrastructure.git"
url = "https://github.com/risesoft-y9/Digital-Infrastructure"
}
}
}

View File

@ -1,76 +0,0 @@
plugins {
signing
`version-catalog`
`maven-publish`
id("tech.yanand.maven-central-publish")
}
group = "net.risesoft.y9"
version = "0.0.1"
signing {
//useGpgCmd()
val signingInMemoryKey: String? by project
val signingInMemoryKeyId: String? by project
val signingInMemoryKeyPassword: String? by project
useInMemoryPgpKeys(signingInMemoryKeyId, signingInMemoryKey, signingInMemoryKeyPassword)
sign(publishing.publications)
}
publishing {
publications {
create<MavenPublication>("mavenVersionCatalog") {
from(components["versionCatalog"])
artifactId = project.name
pom {
// 设置打包类型为pom
packaging = "pom"
name = project.name
description = "RiseSoft/Digital Infrastructure " + project.name
url = findProperty("PROJECT_GIT_URL").toString()
licenses {
license {
name = "GNU General Public License (GPL) version 3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
name = "dingzhaojun"
email = "dingzhaojun@risesoft.net"
}
developer {
name = "qinman"
email = "qinman@risesoft.net"
}
developer {
name = "mengjuhua"
email = "mengjuhua@risesoft.net"
}
developer {
name = "shidaobang"
email = "shidaobang@risesoft.net"
}
}
scm {
connection = findProperty("PROJECT_SCM_URL").toString()
developerConnection = findProperty("PROJECT_SCM_URL").toString()
url = findProperty("PROJECT_GIT_URL").toString()
}
}
}
}
}
mavenCentral {
// 从 Sonatype 官方获取的 Publisher API 调用的 token应为 Base64 编码后的 username:password
authToken = findProperty("mavenCentralAuthToken").toString()
// 上传是否应该自动发布。如果您希望手动执行此操作,请使用 'USER_MANAGED'。
// 该属性是可选的,默认为 'AUTOMATIC'。
publishingType = "AUTOMATIC"
// 当发布类型为 'AUTOMATIC' 时状态API获取 'PUBLISHING' 或 'PUBLISHED' 状态的最大等待时间
// 或者当发布类型为 'USER_MANAGED' 时,获取 'VALIDATED' 状态。
// 该属性是可选的默认为60秒。
maxWait = 60
}

10
settings.gradle Normal file
View File

@ -0,0 +1,10 @@
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.10/userguide/multi_project_builds.html in the Gradle documentation.
* This project uses @Incubating APIs which are subject to change.
*/
rootProject.name = 'y9-build-logic'
include('y9plugins')

View File

@ -1,4 +0,0 @@
rootProject.name = "y9-build-logic"
includeBuild("risenet-gradle-build-logic")
includeBuild("risenet-gradle-version-catalog")

53
y9plugins/build.gradle Normal file
View File

@ -0,0 +1,53 @@
import org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader
plugins {
id 'groovy-gradle-plugin'
id 'com.gradle.plugin-publish' version '1.3.0' //plugin本身已经包含了Java-gradle-plugin和maven-publish
}
group = 'net.risesoft.y9'
version = '1.0'
gradlePlugin {
website = 'https://svn.youshengyun.com:3000/risesoft/y9-build-logic'
vcsUrl = 'https://svn.youshengyun.com:3000/risesoft/y9-build-logic'
plugins{
project.afterEvaluate {
removeIf { it.id.equals 'net.risesoft.y9.aspectj'}
register('y9aspectj') {
id = 'net.risesoft.y9.aspectj'
implementationClass = "NetRisesoftY9AspectjPlugin"
displayName = "Gradle convention plugin that using aspectj"
description = "Gradle convention plugin for y9digitalbase aspectj"
tags.addAll('y9','y9digitalbase','risesoft')
}
removeIf { it.id.equals 'net.risesoft.y9.docker'}
register('y9docker') {
id = 'net.risesoft.y9.docker'
implementationClass = "NetRisesoftY9DockerPlugin"
displayName = "Gradle convention plugin that using docker"
description = "Gradle convention plugin for y9digitalbase docker"
tags.addAll('y9','y9digitalbase','risesoft')
}
removeIf { it.id.equals 'net.risesoft.y9.java-conventions'}
register('y9javaConventions') {
id = 'net.risesoft.y9.java-conventions'
implementationClass = "NetRisesoftY9JavaConventionsPlugin"
displayName = "Gradle convention plugin that using java"
description = "Gradle convention plugin for y9digitalbase java convention"
tags.addAll('y9','y9digitalbase','risesoft')
}
removeIf { it.id.equals 'net.risesoft.y9.smart-doc'}
register('y9SmartDoc') {
id = 'net.risesoft.y9.smart-doc'
implementationClass = "NetRisesoftY9SmartDocPlugin"
displayName = "Gradle convention plugin that using smart doc"
description = "Gradle convention plugin for y9digitalbase smart doc"
tags.addAll('y9','y9digitalbase','risesoft')
}
}
}
}

View File

@ -0,0 +1,36 @@
plugins {
id "io.freefair.aspectj.post-compile-weaving"
}
println "apply plugin 'io.freefair.aspectj.post-compile-weaving' for ${project.name}"
dependencies {
api libs.org.aspectj.aspectjrt
api libs.org.aspectj.aspectjtools
aspect libs.org.springframework.spring.aspects
testAspect libs.org.springframework.spring.aspects
}
compileJava {
ajc {
enabled = true
classpath
options {
aspectpath.setFrom configurations.aspect
compilerArgs = []
compilerArgs += "-showWeaveInfo -verbose"
}
}
}
compileTestJava {
ajc {
enabled = true
classpath
options {
aspectpath.setFrom configurations.testAspect
compilerArgs = []
}
}
}

View File

@ -0,0 +1,32 @@
plugins {
id 'com.google.cloud.tools.jib'
}
println "apply plugin 'com.google.cloud.tools.jib' for ${project.name}"
def dateTimeStr = new Date().format("yyyyMMddHHmm")
jib {
from {
image = 'docker-internal.youshengyun.com/tomcat:10.1-jre21-temurin'
platforms {
platform {
architecture = 'amd64'
os = 'linux'
}
platform {
architecture = 'arm64'
os = 'linux'
}
}
}
// container.appRoot = "/usr/local/tomcat/webapps/app"
to {
image "docker-registry-internal.youshengyun.com/${project.name}"
auth {
username = findProperty("dockerUsername") ?: ""
password = findProperty("dockerPassword") ?: ""
}
tags = ['v9.7.0-SNAPSHOT', 'v9.7.x', "v9.7.0-SNAPSHOT-${dateTimeStr}"]
}
}

View File

@ -0,0 +1,94 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.spring.io/snapshot')
}
maven {
url = uri('https://repo.spring.io/milestone')
}
maven {
url = uri('https://maven.aliyun.com/repository/public')
}
maven {
url = uri('https://svn.youshengyun.com:9900/nexus/repository/maven-public/')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
maven {
url = uri('https://build.shibboleth.net/maven/releases/')
}
maven {
url = uri('https://build.shibboleth.net/maven/snapshots/')
}
}
group = 'net.risesoft'
version = 'v9.7.0-SNAPSHOT'
java.sourceCompatibility = JavaVersion.VERSION_21
java {
withJavadocJar()
withSourcesJar()
}
compileJava {
options.compilerArgs << '-parameters'
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
repositories {
maven {
name = 'y9-internet-repo'
url = 'https://svn.youshengyun.com:9900/nexus/repository/maven-snapshots/'
credentials {
username = findProperty("mavenUsername") ?: ""
password = findProject("mavenPassword") ?: ""
}
// name = 'myRepo'
// url = layout.buildDirectory.dir("repo")
}
}
}
signing {
useGpgCmd()
sign publishing.publications.maven
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet') //
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}

View File

@ -0,0 +1,10 @@
plugins {
id 'com.ly.smart-doc'
}
println "apply plugin 'com.ly.smart-doc' for ${project.name}"
smartdoc {
configFile = file("src/main/resources/smart-doc.json")
include 'net.risesoft*'
}