mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-17 06:19:35 +08:00
Set jfx properly
This commit is contained in:
parent
6601f9a06c
commit
2e70218c1a
@ -1,9 +1,15 @@
|
||||
plugins {
|
||||
id("kotlinx-serialization")
|
||||
id("org.openjfx.javafxplugin") version "0.0.8"
|
||||
id("kotlin")
|
||||
id("java")
|
||||
}
|
||||
|
||||
javafx {
|
||||
version = "11"
|
||||
modules = listOf("javafx.controls")
|
||||
//mainClassName = "Application"
|
||||
}
|
||||
|
||||
apply(plugin = "com.github.johnrengelman.shadow")
|
||||
|
||||
|
@ -44,7 +44,6 @@ include(':mirai-core-qqandroid')
|
||||
|
||||
include(':mirai-japt')
|
||||
include(':mirai-console')
|
||||
include(':mirai-console-graphical')
|
||||
include(':mirai-console-terminal')
|
||||
//include(':mirai-api')
|
||||
include(':mirai-api-http')
|
||||
@ -54,24 +53,23 @@ include(':mirai-demos:mirai-demo-java')
|
||||
include(':mirai-plugins')
|
||||
include(':mirai-plugins:image-sender')
|
||||
|
||||
def javaVersion = System.getProperty("java.version")
|
||||
def versionPos = javaVersion.indexOf(".")
|
||||
if (versionPos==-1) versionPos = javaVersion.indexOf("-")
|
||||
if (versionPos==-1){
|
||||
println("jdk version unknown")
|
||||
}else{
|
||||
def javaVersionNum = javaVersion.substring(0, versionPos).toInteger()
|
||||
if (javaVersionNum >= 11) {
|
||||
println("jdk版本为 "+ javaVersionNum)
|
||||
//include(':mirai-debug')
|
||||
} else {
|
||||
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
|
||||
try{
|
||||
def javaVersion = System.getProperty("java.version")
|
||||
def versionPos = javaVersion.indexOf(".")
|
||||
if (versionPos==-1) versionPos = javaVersion.indexOf("-")
|
||||
if (versionPos==-1){
|
||||
println("jdk version unknown")
|
||||
}else{
|
||||
def javaVersionNum = javaVersion.substring(0, versionPos).toInteger()
|
||||
if (javaVersionNum >= 11) {
|
||||
println("jdk版本为 "+ javaVersionNum)
|
||||
include(':mirai-console-graphical')
|
||||
} else {
|
||||
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
|
||||
}
|
||||
}
|
||||
}catch(Exception ignored){
|
||||
|
||||
}
|
||||
|
||||
project(':mirai-demos:mirai-demo-1').projectDir = file('mirai-demos/mirai-demo-1')
|
||||
project(':mirai-demos:mirai-demo-gentleman').projectDir = file('mirai-demos/mirai-demo-gentleman')
|
||||
project(':mirai-demos:mirai-demo-java').projectDir = file('mirai-demos/mirai-demo-java')
|
||||
project(':mirai-plugins:image-sender').projectDir = file('mirai-plugins/image-sender')
|
||||
|
||||
enableFeaturePreview('GRADLE_METADATA')
|
Loading…
Reference in New Issue
Block a user