代码拉取完成,页面将自动刷新
rootProject.name = "overtime-server-springboot"
// include("overtime-application")
// include("overtime-gateway")
includes("overtime-configuration") {
sub("configuration-handler") // 异常处理、响应值处理
sub("configuration-r2dbc-template") // r2dbc template.
}
includes("overtime-common") {
sub("common-core")
sub("common-domain")
sub("common-service")
sub("common-repository")
sub("common-application")
sub("common-jwt")
}
include("overtime-gateway")
val modules = listOf(
"domain", "repository",
"service", "service-impl",
"api", "controller", "application"
)
includes("services") {
// 字典模块
sub("dictionary") { serviceSubs() }
// 补偿模块
sub("compensate") { serviceSubs() }
// 用户模块
sub("user") { serviceSubs() }
}
include("overtime-application")
println()
////////////////
@kotlin.DslMarker
annotation class IncDsl
@kotlin.DslMarker
annotation class IncOuterDsl
class Include(parentPath: String?, val id: String) {
internal val path: String =
if (parentPath != null) "$parentPath:$id" else id
@Suppress("NOTHING_TO_INLINE")
fun doInc(ignoreIfNotExists: Boolean = false) {
if (ignoreIfNotExists) {
kotlin.runCatching {
include(path)
}.getOrElse {
println("> [Warn]: Include $path failed: ${it.localizedMessage}")
}
} else {
include(path)
}
println("> Include $path")
// val p = project(":$path")
// p.name = name
}
@IncDsl
@Suppress("NOTHING_TO_INLINE")
fun sub(path: String, ignoreIfNotExists: Boolean = false, block: (Include.() -> Unit) = {}) {
val inc = Include(this.path, path)
inc.doInc(ignoreIfNotExists)
block(inc)
}
}
@IncOuterDsl
@Suppress("NOTHING_TO_INLINE")
fun includes(id: String, block: (Include.() -> Unit) = {}) {
val inc = Include(null, id)
inc.doInc()
block(inc)
}
@IncOuterDsl
@Suppress("NOTHING_TO_INLINE")
fun Include.serviceSubs(ignoreIfNotExists: Boolean = false) {
modules.forEach {
sub("$id-$it", ignoreIfNotExists)
}
}
include("overtime-admin")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。