mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
Merge pull request #333 from sgoings/master
Add win32/win64 resolution in Gradle build
This commit is contained in:
commit
70d2ce429c
52
build.gradle
52
build.gradle
@ -70,6 +70,35 @@ ext {
|
||||
}
|
||||
java_home = java_home
|
||||
|
||||
libDir = "${buildDir}/lib"
|
||||
}
|
||||
|
||||
repositories {
|
||||
ivy {
|
||||
name "ivyLocal"
|
||||
url "${System.env.HOME}/.ivy2/local"
|
||||
layout 'maven'
|
||||
}
|
||||
|
||||
ivy {
|
||||
name "jcenter"
|
||||
if(version.contains("SNAPSHOT")) {
|
||||
url "http://oss.jfrog.org/artifactory/oss-snapshot-local"
|
||||
} else {
|
||||
url "http://oss.jfrog.org/artifactory/oss-release-local"
|
||||
}
|
||||
layout 'maven'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
create('windows-i386')
|
||||
create('windows-x86_64')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
'windows-i386' "com.readytalk:win32:1.0.0-SNAPSHOT"
|
||||
'windows-x86_64' "com.readytalk:win64:1.0.0-SNAPSHOT"
|
||||
}
|
||||
|
||||
model {
|
||||
@ -88,10 +117,26 @@ model {
|
||||
|
||||
tasks {
|
||||
platforms.each { platform ->
|
||||
if(platform.operatingSystem.name == "windows") {
|
||||
def artifactName = platform.architecture.name == "i386" ? 'win32' : 'win64'
|
||||
|
||||
task "extract${platform.name}"(type: Copy) {
|
||||
from {
|
||||
tarTree(configurations."${platform.name}".find { it.name =~ artifactName })
|
||||
}
|
||||
into "${libDir}/tools"
|
||||
}
|
||||
}
|
||||
|
||||
task "build${platform.name}"(type: Exec) {
|
||||
executable "make"
|
||||
args "platform=${platform.operatingSystem.name}",
|
||||
"arch=${platform.architecture.name}"
|
||||
if(platform.operatingSystem.name == "windows") {
|
||||
dependsOn "extract${platform.name}"
|
||||
args "win32=${libDir}/tools/win32",
|
||||
"win64=${libDir}/tools/win64"
|
||||
}
|
||||
environment JAVA_HOME: java_home
|
||||
}
|
||||
|
||||
@ -142,10 +187,7 @@ task install {
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
ivy {
|
||||
url "${System.env.HOME}/.ivy2/local"
|
||||
layout 'maven'
|
||||
}
|
||||
add(project.repositories."ivyLocal")
|
||||
}
|
||||
|
||||
publications {
|
||||
@ -238,5 +280,5 @@ artifactory {
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '2.0'
|
||||
distributionUrl = 'http://services.gradle.org/distributions/gradle-2.0-bin.zip'
|
||||
}
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Wed Jul 23 15:29:56 MDT 2014
|
||||
#Thu Aug 28 14:47:06 MDT 2014
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
|
Loading…
Reference in New Issue
Block a user