加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
package.gradle 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
Dmitry Barashev 提交于 2019-06-28 01:58 . macos & windows
/*
* Open Source Software published under the Apache Licence, Version 2.0.
*/
import org.gradle.internal.os.OperatingSystem
plugins {
id "de.undercouch.download" version "3.4.3"
}
ext {
currentOs = OperatingSystem.current()
}
task downloadZipFile(type: Download) {
def srcFile = ""
if (project.ext.currentOs.isWindows()) {
srcFile = 'https://gluonhq.com/download/javafx-11-0-2-jmods-windows/'
} else if (currentOs.isLinux()) {
srcFile = 'https://gluonhq.com/download/javafx-11-0-2-jmods-linux/'
} else if (currentOs.isMacOsX()) {
srcFile = 'https://gluonhq.com/download/javafx-11-0-2-jmods-mac/'
}
println("Downloading JavaFX mods for $currentOs from $srcFile")
src srcFile
dest new File(buildDir, 'javafx-jmods-11.zip')
}
task installJavafxJmods(dependsOn: downloadZipFile, type: Copy) {
from zipTree(downloadZipFile.dest)
into buildDir
}
task build(dependsOn: installJavafxJmods) {
doLast {
if (project.ext.currentOs.isLinux()) {
exec {
workingDir '.'
commandLine 'build-bin/package-lin.sh', 'build', 'ganttproject-builder/dist-bin', '2.99.0', 'build/javafx-jmods-11.0.2'
}
} else if (project.ext.currentOs.isWindows()) {
exec {
workingDir '.'
environment("PWD", System.getProperty("user.dir"))
commandLine 'build-bin\\package-win.bat', 'build', 'ganttproject-builder\\dist-bin', '2.99.0', 'build\\javafx-jmods-11.0.2'
}
} else if (project.ext.currentOs.isMacOsX()) {
exec {
workingDir '.'
commandLine 'build-bin/package-mac.sh', 'build', 'ganttproject-builder/dist-bin', '2.99.0', 'build/javafx-jmods-11.0.2'
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化