| 1 |
/* |
| 2 |
################################################################################ |
| 3 |
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # |
| 4 |
# Read the zproject/README.md for information about making permanent changes. # |
| 5 |
################################################################################ |
| 6 |
*/ |
| 7 |
|
| 8 |
dependencies { |
| 9 |
compile project(':czmq-jni') |
| 10 |
} |
| 11 |
|
| 12 |
// ------------------------------------------------------------------ |
| 13 |
// Build section |
| 14 |
|
| 15 |
task copyLibs(type: Copy) { |
| 16 |
def libraryPaths = System.getProperty('java.library.path').split(File.pathSeparator).toList() |
| 17 |
libraryPaths.add('/usr/local/lib') |
| 18 |
if (osdetector.os == 'windows') { |
| 19 |
libraryPaths.add("${rootDir}/czmq-jni/build/Release") |
| 20 |
} else { |
| 21 |
libraryPaths.add("${rootDir}/czmq-jni/build") |
| 22 |
} |
| 23 |
if (project.hasProperty('buildPrefix')) { |
| 24 |
if (osdetector.os == 'windows') { |
| 25 |
// DLLs are installed to the bin directory by cmake |
| 26 |
libraryPaths.add("${project.buildPrefix}/bin") |
| 27 |
} |
| 28 |
libraryPaths.add("${project.buildPrefix}/lib") |
| 29 |
} |
| 30 |
|
| 31 |
libraryPaths.each { path -> |
| 32 |
from path |
| 33 |
include 'libczmqjni.so' |
| 34 |
include 'libczmqjni.dylib' |
| 35 |
include '*czmqjni*.dll' |
| 36 |
include 'libczmq.so' |
| 37 |
include 'libczmq.dylib' |
| 38 |
include '*czmq*.dll' |
| 39 |
include 'libzmq.so' |
| 40 |
include 'libzmq.dylib' |
| 41 |
include '*zmq*.dll' |
| 42 |
include 'uuid.so' |
| 43 |
include 'uuid.dylib' |
| 44 |
include '*uuid*.dll' |
| 45 |
include 'libsystemd.so' |
| 46 |
include 'libsystemd.dylib' |
| 47 |
include '*libsystemd*.dll' |
| 48 |
include 'liblz4.so' |
| 49 |
include 'liblz4.dylib' |
| 50 |
include '*lz4*.dll' |
| 51 |
include 'libcurl.so' |
| 52 |
include 'libcurl.dylib' |
| 53 |
include '*curl*.dll' |
| 54 |
include 'nss.so' |
| 55 |
include 'nss.dylib' |
| 56 |
include '*nss*.dll' |
| 57 |
include 'libmicrohttpd.so' |
| 58 |
include 'libmicrohttpd.dylib' |
| 59 |
include '*microhttpd*.dll' |
| 60 |
into 'build/natives' |
| 61 |
} |
| 62 |
} |
| 63 |
|
| 64 |
jar.baseName = "czmq-jni-${osdetector.classifier}" |
| 65 |
jar.dependsOn copyLibs |
| 66 |
|
| 67 |
jar { |
| 68 |
def arch = osdetector.arch.contains('64') ? '64' : '32' |
| 69 |
from 'build/natives' |
| 70 |
include '*' |
| 71 |
into "natives/${osdetector.os}_${arch}" |
| 72 |
} |
| 73 |
|
| 74 |
// ------------------------------------------------------------------ |
| 75 |
// Install and Publish section |
| 76 |
|
| 77 |
publishing { |
| 78 |
publications { |
| 79 |
mavenJava(MavenPublication) { |
| 80 |
from components.java |
| 81 |
artifactId = "czmq-jni-${osdetector.classifier}" |
| 82 |
pom { |
| 83 |
name = "czmq-jni-${osdetector.classifier}" |
| 84 |
description = 'The high-level C binding for 0MQ' |
| 85 |
packaging = 'jar' |
| 86 |
url = 'https://github.com/zeromq/czmq' |
| 87 |
licenses { |
| 88 |
license { |
| 89 |
name = 'Mozilla Public License Version 2.0' |
| 90 |
url = 'https://www.mozilla.org/en-US/MPL/2.0/' |
| 91 |
} |
| 92 |
} |
| 93 |
scm { |
| 94 |
connection = 'https://github.com/zeromq/czmq.git' |
| 95 |
developerConnection = 'https://github.com/zeromq/czmq.git' |
| 96 |
url = 'https://github.com/zeromq/czmq' |
| 97 |
} |
| 98 |
} |
| 99 |
} |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
artifactoryPublish { |
| 104 |
publications ('mavenJava') |
| 105 |
} |
| 106 |
|
| 107 |
bintray { |
| 108 |
user = System.getenv('BINTRAY_USER') |
| 109 |
key = System.getenv('BINTRAY_KEY') |
| 110 |
publications = ['mavenJava'] |
| 111 |
publish = true |
| 112 |
override = true |
| 113 |
pkg { |
| 114 |
repo = 'maven' |
| 115 |
name = "czmq-jni-${osdetector.classifier}" |
| 116 |
desc = 'The high-level C binding for 0MQ' |
| 117 |
userOrg = System.getenv('BINTRAY_USER_ORG') |
| 118 |
licenses = ['MPL-2.0'] |
| 119 |
websiteUrl = 'https://github.com/zeromq/czmq' |
| 120 |
issueTrackerUrl = 'https://github.com/zeromq/czmq/issues' |
| 121 |
vcsUrl = 'https://github.com/zeromq/czmq.git' |
| 122 |
githubRepo = System.getenv('BINTRAY_USER_ORG') + '/czmq' |
| 123 |
version { |
| 124 |
name = project.version |
| 125 |
vcsTag= project.version |
| 126 |
} |
| 127 |
} |
| 128 |
} |
| 129 |
|
| 130 |
// ------------------------------------------------------------------ |
| 131 |
// Cleanup section |
| 132 |
|
| 133 |
clean.doFirst { |
| 134 |
delete fileTree(projectDir) { |
| 135 |
include '*.so' |
| 136 |
include '*.dylib' |
| 137 |
} |
| 138 |
} |