fix build issue on windows

This commit is contained in:
Stefano Franz 2018-05-18 18:08:42 +01:00
parent d33f31614c
commit b2bc411321

View File

@ -46,17 +46,13 @@ task copyLauncherLibs(type: Copy, dependsOn: [project(':launcher').jar]) {
into "$buildDir/tmp/launcher-lib"
}
// The launcher building is done as it depends on application-specific settings which
// cannot be overridden later
task buildLauncher(type: Exec, dependsOn: [copyLauncherLibs]) {
def isLinux = System.properties['os.name'].toLowerCase().contains('linux')
def isMac = System.properties['os.name'].toLowerCase().contains('mac')
if (isLinux || isMac) {
println("Detected *nix system, enabling distribution creation")
task buildLauncher(type: Exec, dependsOn: [copyLauncherLibs]) {
description 'Build Launcher executable'
def isLinux = System.properties['os.name'].toLowerCase().contains('linux')
def isMac = System.properties['os.name'].toLowerCase().contains('mac')
if (!isLinux && !isMac)
throw new GradleException("Preparing distribution package is currently only supported on Linux/Mac")
def relativeDir
if (isLinux)
relativeDir = "launcher"
@ -118,9 +114,9 @@ task buildLauncher(type: Exec, dependsOn: [copyLauncherLibs]) {
"classpath=${nodeClasspath.join(':')}",
"plugins=./drivers:./cordapps"].join("\n")
}
}
}
task buildNode(type: Copy, dependsOn: [buildLauncher, project(':docs').tasks['makeDocs'], project(':node').tasks['jar']]) {
task buildNode(type: Copy, dependsOn: [buildLauncher, project(':docs').tasks['makeDocs'], project(':node').tasks['jar']]) {
description 'Build stand-alone Corda Node distribution'
into(outputDir)
@ -152,8 +148,10 @@ task buildNode(type: Copy, dependsOn: [buildLauncher, project(':docs').tasks['ma
doLast {
new File("${outputDir}/cordapps").mkdirs()
new File("${outputDir}/drivers").mkdirs()
println ("Stand-alone Corda Node application available at:")
println ("${outputDir}")
println("Stand-alone Corda Node application available at:")
println("${outputDir}")
}
}
}else{
println("Not running on *nix, disabling distribution generation")
}