代码拉取完成,页面将自动刷新
同步操作将从 Rococy/RoomIt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.10'
id 'org.beryx.jlink' version '2.24.1'
}
group 'org.rococy'
version '1.1'
repositories {
mavenCentral()
}
ext {
junitVersion = '5.9.0'
}
sourceCompatibility = "17"
targetCompatibility = "17"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jpackageImage {
// 先删除原来打包的东西
dependsOn(clean)
}
task renamePackage(type: Exec) {
commandLine 'cmd', "/c", "ren ${buildDir}\\jpackage\\RoomIt RoomIt-win-x64"
}
task copyConfigDir(type: Exec) {
dependsOn(renamePackage)
commandLine 'cmd', "/c", "echo d | xcopy ${projectDir}\\config ${buildDir}\\jpackage\\RoomIt-win-x64\\config /s /f"
}
task zipPackage(type: Exec) {
dependsOn(copyConfigDir)
commandLine 'cmd', "/c", "start /b 360zip -ar ${buildDir}\\jpackage\\RoomIt-win-x64 ${buildDir}\\jpackage\\RoomIt-win-x64.zip"
}
task movePackage(type: Exec) {
commandLine 'cmd', "/c", "move ${buildDir}\\jpackage\\RoomIt-win-x64.zip ${projectDir}\\dist"
}
task deleteOldZip(type: Exec) {
commandLine 'cmd', "/c", "if exist ${projectDir}\\dist\\RoomIt-win-x64.zip (del ${projectDir}\\dist\\RoomIt-win-x64.zip)"
}
clean {
dependsOn(deleteOldZip)
}
zipPackage.finalizedBy(movePackage)
jpackageImage.finalizedBy(zipPackage)
application {
mainModule = 'org.rococy.roomit'
mainClass = 'org.rococy.roomit.Launcher'
}
javafx {
version = '11.0.2'
modules = ['javafx.controls', 'javafx.fxml']
}
dependencies {
implementation("com.google.code.gson:gson:2.9.1")
implementation('net.java.dev.jna:jna:5.12.1')
implementation('net.java.dev.jna:jna-platform:5.12.1')
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes "Implementation-Title": project.name
attributes "Implementation-Version": project.version
attributes 'Main-Class': 'org.rococy.roomit.Launcher'
}
}
jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip") as RegularFile
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'RoomIt'
jvmArgs = ["-Djava.library.path=C:/"]
}
jpackage {
appVersion = project.version
icon = "icon/logo16x16.ico"
imageName = "RoomIt"
imageOptions = ["--vendor", "Rococy", "--description", "基于JavaFx开源的屏幕画笔工具"]
}
}
jlinkZip {
group = 'distribution'
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。