Commit 550d781f authored by Him188's avatar Him188

ignore `mirai-debug` if jdk version detection fails

parent fcc6100c
......@@ -51,10 +51,14 @@ include(':mirai-plugins')
include(':mirai-plugins:image-sender')
def javaVersion = System.getProperty("java.version")
if (javaVersion.substring(0, javaVersion.indexOf(".")).toInteger() >= 11) {
include(':mirai-debug')
} else {
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
try {
if (javaVersion.substring(0, javaVersion.indexOf(".")).toInteger() >= 11) {
include(':mirai-debug')
} else {
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
}
} catch (Exception ignored) {
println("无法检测 JDK 版本, 将不会引入 `:mirai-debug`")
}
project(':mirai-demos:mirai-demo-1').projectDir = file('mirai-demos/mirai-demo-1')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment