mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
Add lzma support
This commit is contained in:
parent
4bacddb20a
commit
e60f53db73
36
build.gradle
36
build.gradle
@ -71,6 +71,9 @@ ext {
|
|||||||
java_home = java_home
|
java_home = java_home
|
||||||
|
|
||||||
libDir = "${buildDir}/lib"
|
libDir = "${buildDir}/lib"
|
||||||
|
lzmaDir = "${libDir}/lzma"
|
||||||
|
|
||||||
|
buildOptions = ['', '-lzma']
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -110,6 +113,7 @@ model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
buildOptions.each { buildOption ->
|
||||||
platforms.each { platform ->
|
platforms.each { platform ->
|
||||||
if(platform.operatingSystem.name == "windows") {
|
if(platform.operatingSystem.name == "windows") {
|
||||||
def artifactName = platform.architecture.name == "i386" ? 'win32' : 'win64'
|
def artifactName = platform.architecture.name == "i386" ? 'win32' : 'win64'
|
||||||
@ -122,10 +126,16 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task "build${platform.name}"(type: Exec) {
|
task "build${platform.name}${buildOption}"(type: Exec) {
|
||||||
executable "make"
|
executable "make"
|
||||||
args "platform=${platform.operatingSystem.name}",
|
args "platform=${platform.operatingSystem.name}",
|
||||||
"arch=${platform.architecture.name}"
|
"arch=${platform.architecture.name}"
|
||||||
|
|
||||||
|
if(buildOption == "-lzma") {
|
||||||
|
dependsOn 'extractLzma'
|
||||||
|
args "lzma=${lzmaDir}"
|
||||||
|
}
|
||||||
|
|
||||||
if(platform.operatingSystem.name == "windows") {
|
if(platform.operatingSystem.name == "windows") {
|
||||||
dependsOn "extract${platform.name}"
|
dependsOn "extract${platform.name}"
|
||||||
args "win32=${libDir}/tools/win32",
|
args "win32=${libDir}/tools/win32",
|
||||||
@ -135,7 +145,8 @@ model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assemble {
|
assemble {
|
||||||
dependsOn "build${platform.name}"
|
dependsOn "build${platform.name}${buildOption}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,6 +186,19 @@ jar {
|
|||||||
baseName "classpath-avian"
|
baseName "classpath-avian"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task downloadLzma(type: Exec) {
|
||||||
|
commandLine "curl"
|
||||||
|
args "--create-dirs", "-o", "${lzmaDir}/lzma920.tar.bz2", "-f", "http://oss.readytalk.com/avian-web/lzma920.tar.bz2"
|
||||||
|
}
|
||||||
|
|
||||||
|
task extractLzma(type: Copy) {
|
||||||
|
dependsOn downloadLzma
|
||||||
|
from {
|
||||||
|
tarTree(resources.bzip2("${lzmaDir}/lzma920.tar.bz2"))
|
||||||
|
}
|
||||||
|
into lzmaDir
|
||||||
|
}
|
||||||
|
|
||||||
task install {
|
task install {
|
||||||
dependsOn assemble, publish
|
dependsOn assemble, publish
|
||||||
}
|
}
|
||||||
@ -212,19 +236,20 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildOptions.each { buildOption ->
|
||||||
platforms.each { platform ->
|
platforms.each { platform ->
|
||||||
def binSuffix=""
|
def binSuffix=""
|
||||||
def publishBinSuffix="bin"
|
def publishBinSuffix="bin"
|
||||||
|
|
||||||
create(platform.name, IvyPublication) {
|
create("${platform.name}${buildOption}", IvyPublication) {
|
||||||
def nativeBuildDir = "${buildDir}/${platform.operatingSystem.name}-${platform.architecture.name}"
|
def nativeBuildDir = "${buildDir}/${platform.operatingSystem.name}-${platform.architecture.name}${buildOption}"
|
||||||
|
|
||||||
if(platform.operatingSystem.name == "windows") {
|
if(platform.operatingSystem.name == "windows") {
|
||||||
publishBinSuffix = "exe"
|
publishBinSuffix = "exe"
|
||||||
binSuffix = ".${publishBinSuffix}"
|
binSuffix = ".${publishBinSuffix}"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "runtime-avian-${platform.name}"
|
module "runtime-avian${buildOption}-${platform.name}"
|
||||||
|
|
||||||
artifact("${nativeBuildDir}/avian${binSuffix}") {
|
artifact("${nativeBuildDir}/avian${binSuffix}") {
|
||||||
name "avian"
|
name "avian"
|
||||||
@ -241,6 +266,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
artifactoryPublish {
|
artifactoryPublish {
|
||||||
onlyIf {
|
onlyIf {
|
||||||
|
Loading…
Reference in New Issue
Block a user