mirror of
https://github.com/corda/corda.git
synced 2025-02-01 16:58:27 +00:00
move binaryToObject to a 'tools' artifact
This commit is contained in:
parent
4b4259be87
commit
282ebf9d84
76
build.gradle
76
build.gradle
@ -13,32 +13,43 @@ apply plugin: 'ivy-publish'
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'artifactory-publish'
|
apply plugin: 'artifactory-publish'
|
||||||
|
|
||||||
|
public String adjustArch(String arch) {
|
||||||
|
switch(arch) {
|
||||||
|
case ~/.*64.*/: return 'x86_64'
|
||||||
|
default: return 'i386'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String adjustPlatform(String platform) {
|
||||||
|
switch(platform.replaceAll(' ', '').toLowerCase()) {
|
||||||
|
case ~/.*linux.*/: return 'linux'
|
||||||
|
case ~/.*darwin.*/: return 'macosx'
|
||||||
|
case ~/.*osx.*/: return 'macosx'
|
||||||
|
case ~/.*win.*/: return 'windows'
|
||||||
|
default: return platform
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ext {
|
||||||
|
currentPlatform = adjustPlatform(System.properties['os.name'])
|
||||||
|
currentArch = adjustArch(System.properties['os.arch'])
|
||||||
|
currentPlatformArch = "${currentPlatform}-${currentArch}"
|
||||||
|
|
||||||
|
platform = project.hasProperty('platform') ? platform : currentPlatform
|
||||||
|
arch = project.hasProperty('arch') ? arch : currentArch
|
||||||
|
platformArch = "${platform}-${arch}"
|
||||||
|
}
|
||||||
|
|
||||||
model {
|
model {
|
||||||
platforms {
|
platforms {
|
||||||
if(project.hasProperty("platform") && project.hasProperty("arch")) {
|
create(platformArch) {
|
||||||
create("${platform}-${arch}") {
|
|
||||||
operatingSystem "${platform}"
|
operatingSystem "${platform}"
|
||||||
architecture "${arch}"
|
architecture "${arch}"
|
||||||
}
|
}
|
||||||
} else {
|
if(platformArch != currentPlatformArch) {
|
||||||
create("linux-x86_64") {
|
create(currentPlatformArch) {
|
||||||
operatingSystem "linux"
|
operatingSystem "${currentPlatform}"
|
||||||
architecture "x86_64"
|
architecture "${currentArch}"
|
||||||
}
|
|
||||||
|
|
||||||
create("linux-i386") {
|
|
||||||
operatingSystem "linux"
|
|
||||||
architecture "i386"
|
|
||||||
}
|
|
||||||
|
|
||||||
create("windows-x86_64") {
|
|
||||||
operatingSystem "windows"
|
|
||||||
architecture "x86_64"
|
|
||||||
}
|
|
||||||
|
|
||||||
create("windows-i386") {
|
|
||||||
operatingSystem "windows"
|
|
||||||
architecture "i386"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,8 +117,6 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
def binSuffix=""
|
|
||||||
def publishBinSuffix="bin"
|
|
||||||
|
|
||||||
ivy(IvyPublication) {
|
ivy(IvyPublication) {
|
||||||
from components.java
|
from components.java
|
||||||
@ -115,7 +124,22 @@ publishing {
|
|||||||
artifact(javadocJar)
|
artifact(javadocJar)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create("tools-${currentPlatformArch}", IvyPublication) {
|
||||||
|
module "avian-tools-${currentPlatformArch}"
|
||||||
|
|
||||||
|
def publishBinSuffix = currentPlatform == "windows" ? "exe" : "bin"
|
||||||
|
def binSuffix = currentPlatform == "windows" ? ".exe" : ""
|
||||||
|
artifact("${buildDir}/${currentPlatform}-${currentArch}/binaryToObject/binaryToObject") {
|
||||||
|
name "binaryToObject"
|
||||||
|
type publishBinSuffix
|
||||||
|
extension binSuffix
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
platforms.each { platform ->
|
platforms.each { platform ->
|
||||||
|
def binSuffix=""
|
||||||
|
def publishBinSuffix="bin"
|
||||||
|
|
||||||
create(platform.name, IvyPublication) {
|
create(platform.name, IvyPublication) {
|
||||||
def nativeBuildDir = "${buildDir}/${platform.operatingSystem.name}-${platform.architecture.name}"
|
def nativeBuildDir = "${buildDir}/${platform.operatingSystem.name}-${platform.architecture.name}"
|
||||||
|
|
||||||
@ -132,12 +156,6 @@ publishing {
|
|||||||
extension publishBinSuffix
|
extension publishBinSuffix
|
||||||
}
|
}
|
||||||
|
|
||||||
artifact("${nativeBuildDir}/binaryToObject/binaryToObject") {
|
|
||||||
name "binaryToObject"
|
|
||||||
type publishBinSuffix
|
|
||||||
extension publishBinSuffix
|
|
||||||
}
|
|
||||||
|
|
||||||
artifact("${nativeBuildDir}/libavian.a") {
|
artifact("${nativeBuildDir}/libavian.a") {
|
||||||
name "libavian"
|
name "libavian"
|
||||||
type "a"
|
type "a"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user