mirror of
https://github.com/corda/corda.git
synced 2025-06-22 09:08:49 +00:00
Merge pull request #859 from roastario/fix_windows_gradle_build
fix build issue on windows
This commit is contained in:
26
node/dist/build.gradle
vendored
26
node/dist/build.gradle
vendored
@ -46,17 +46,13 @@ task copyLauncherLibs(type: Copy, dependsOn: [project(':launcher').jar]) {
|
|||||||
into "$buildDir/tmp/launcher-lib"
|
into "$buildDir/tmp/launcher-lib"
|
||||||
}
|
}
|
||||||
|
|
||||||
// The launcher building is done as it depends on application-specific settings which
|
def isLinux = System.properties['os.name'].toLowerCase().contains('linux')
|
||||||
// cannot be overridden later
|
def isMac = System.properties['os.name'].toLowerCase().contains('mac')
|
||||||
task buildLauncher(type: Exec, dependsOn: [copyLauncherLibs]) {
|
if (isLinux || isMac) {
|
||||||
|
println("Detected *nix system, enabling distribution creation")
|
||||||
|
task buildLauncher(type: Exec, dependsOn: [copyLauncherLibs]) {
|
||||||
description 'Build Launcher executable'
|
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
|
def relativeDir
|
||||||
if (isLinux)
|
if (isLinux)
|
||||||
relativeDir = "launcher"
|
relativeDir = "launcher"
|
||||||
@ -118,9 +114,9 @@ task buildLauncher(type: Exec, dependsOn: [copyLauncherLibs]) {
|
|||||||
"classpath=${nodeClasspath.join(':')}",
|
"classpath=${nodeClasspath.join(':')}",
|
||||||
"plugins=./drivers:./cordapps"].join("\n")
|
"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'
|
description 'Build stand-alone Corda Node distribution'
|
||||||
|
|
||||||
into(outputDir)
|
into(outputDir)
|
||||||
@ -152,8 +148,10 @@ task buildNode(type: Copy, dependsOn: [buildLauncher, project(':docs').tasks['ma
|
|||||||
doLast {
|
doLast {
|
||||||
new File("${outputDir}/cordapps").mkdirs()
|
new File("${outputDir}/cordapps").mkdirs()
|
||||||
new File("${outputDir}/drivers").mkdirs()
|
new File("${outputDir}/drivers").mkdirs()
|
||||||
println ("Stand-alone Corda Node application available at:")
|
println("Stand-alone Corda Node application available at:")
|
||||||
println ("${outputDir}")
|
println("${outputDir}")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
println("Not running on *nix, disabling distribution generation")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user