Skip to content

Commit 0f01674

Browse files
committed
Regenerate from zproject
1 parent f2fd725 commit 0f01674

File tree

4 files changed

+40
-29
lines changed

4 files changed

+40
-29
lines changed

bindings/jni/build.gradle

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@
55
################################################################################
66
*/
77

8+
buildscript {
9+
configurations.configureEach {
10+
resolutionStrategy {
11+
force 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
12+
}
13+
exclude group: 'xerces', module: 'xercesImpl'
14+
}
15+
}
16+
817
plugins {
918
id 'java'
1019
id 'maven-publish'
11-
id 'com.jfrog.artifactory' version '4.21.0'
20+
id 'com.jfrog.artifactory' version '5.2.3'
1221
id 'com.jfrog.bintray' version '1.8.5'
13-
id 'com.google.osdetector' version '1.7.0'
22+
id 'com.google.osdetector' version '1.7.3'
1423
}
1524

16-
wrapper.gradleVersion = '7.5.1'
25+
wrapper.gradleVersion = '8.9'
1726

1827
subprojects {
1928
apply plugin: 'java'
@@ -47,7 +56,6 @@ artifactory {
4756
repoKey = 'oss-snapshot-local'
4857
username = System.getenv('ARTIFACTORY_USERNAME')
4958
password = System.getenv('ARTIFACTORY_PASSWORD')
50-
maven = true
5159
}
5260
}
5361
}

bindings/jni/zyre-jni-all/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ artifactoryPublish {
4747
publications ('mavenJava')
4848
}
4949

50-
5150
bintray {
5251
user = System.getenv('BINTRAY_USER')
5352
key = System.getenv('BINTRAY_KEY')

bindings/jni/zyre-jni-native/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies {
1313
// ------------------------------------------------------------------
1414
// Build section
1515

16-
task copyLibs(type: Copy) {
16+
tasks.register('copyLibs', Copy) {
1717
def libraryPaths = []
1818
if (project.hasProperty('buildPrefix')) {
1919
if (osdetector.os == 'windows') {
@@ -24,7 +24,7 @@ task copyLibs(type: Copy) {
2424
}
2525

2626
def javaLibraryPaths = System.getProperty('java.library.path').split(File.pathSeparator).toList()
27-
libraryPaths.addAll (javaLibraryPaths)
27+
libraryPaths.addAll(javaLibraryPaths)
2828

2929
libraryPaths.add('/usr/local/lib')
3030
if (osdetector.os == 'windows') {
@@ -54,7 +54,7 @@ task copyLibs(type: Copy) {
5454
duplicatesStrategy = oldStrategy
5555
}
5656

57-
jar.baseName = "zyre-jni-${osdetector.classifier}"
57+
jar.archiveBaseName = "zyre-jni-${osdetector.classifier}"
5858
jar.dependsOn copyLibs
5959

6060
jar {

bindings/jni/zyre-jni/build.gradle

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ ext.hasNotEmptyProperty = { propertyName ->
1212

1313
dependencies {
1414
implementation "org.zeromq.czmq:czmq-jni:$jni_dependencies_version"
15-
implementation 'org.scijava:native-lib-loader:2.4.0'
16-
testImplementation 'junit:junit:4.12'
17-
testImplementation 'org.hamcrest:hamcrest-all:1.3'
15+
implementation 'org.scijava:native-lib-loader:2.5.0'
16+
testImplementation 'junit:junit:4.13.2'
17+
testImplementation 'org.hamcrest:hamcrest:2.2'
1818
}
1919

2020
// ------------------------------------------------------------------
2121
// Build section
2222

23-
task generateJniHeaders(type: Exec, dependsOn: 'classes') {
23+
tasks.register('generateJniHeaders', Exec) {
24+
dependsOn 'classes'
2425
def classpath = sourceSets.main.output.classesDirs
2526
def appclasspath = configurations.runtimeClasspath.files*.getAbsolutePath().join(File.pathSeparator)
2627
def nativeIncludes = 'src/native/include'
@@ -34,14 +35,14 @@ task generateJniHeaders(type: Exec, dependsOn: 'classes') {
3435
commandLine("javac", "-h", "$nativeIncludes", "-classpath", "$classpath${File.pathSeparator}$appclasspath", *jniClasses, *utilityClasses)
3536
}
3637

37-
tasks.withType(Test) {
38+
tasks.withType(Test).configureEach {
3839
def defaultJavaLibraryPath = System.getProperty("java.library.path")
3940
if (osdetector.os == 'windows') {
40-
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : ''
41-
extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\")
42-
systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" +
43-
"${extraJavaLibraryPath}${File.pathSeparator}" +
44-
"${defaultJavaLibraryPath}"
41+
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : ''
42+
extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\")
43+
systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" +
44+
"${extraJavaLibraryPath}${File.pathSeparator}" +
45+
"${defaultJavaLibraryPath}"
4546
} else {
4647
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix/lib" : ''
4748
systemProperty "java.library.path", "${projectDir}/build${File.pathSeparator}" +
@@ -52,22 +53,24 @@ tasks.withType(Test) {
5253
}
5354
}
5455

55-
task initCMake(type: Exec, dependsOn: 'generateJniHeaders') {
56-
workingDir 'build'
56+
tasks.register('initCMake', Exec) {
57+
dependsOn 'generateJniHeaders'
58+
workingDir 'build'
5759
def prefixPath = hasNotEmptyProperty('buildPrefix') ? "-DCMAKE_PREFIX_PATH=$project.buildPrefix" : ''
5860
commandLine 'cmake', "$prefixPath", '..'
5961
}
6062

61-
task buildNative(type: Exec, dependsOn: 'initCMake') {
63+
tasks.register('buildNative', Exec) {
64+
dependsOn 'initCMake'
6265
if (osdetector.os == 'windows') {
6366
commandLine 'cmake',
64-
'--build', 'build',
67+
'--build', 'build',
6568
'--config', 'Release',
6669
'--target', 'zyrejni',
67-
'--', '-verbosity:Minimal', '-maxcpucount'
70+
'--', '-verbosity:Minimal', '-maxcpucount'
6871
} else {
6972
commandLine 'cmake',
70-
'--build', 'build'
73+
'--build', 'build'
7174
}
7275
}
7376

@@ -77,13 +80,15 @@ test.dependsOn buildNative
7780
// ------------------------------------------------------------------
7881
// Install and Publish section
7982

80-
task sourcesJar(type: Jar, dependsOn: 'classes') {
81-
classifier = 'sources'
83+
tasks.register('sourcesJar', Jar) {
84+
dependsOn 'classes'
85+
archiveClassifier = 'sources'
8286
from sourceSets.main.allSource
8387
}
8488

85-
task javadocJar(type: Jar, dependsOn: 'javadoc') {
86-
classifier = 'javadoc'
89+
tasks.register('javadocJar', Jar) {
90+
dependsOn 'javadoc'
91+
archiveClassifier = 'javadoc'
8792
from javadoc.destinationDir
8893
}
8994

@@ -119,7 +124,6 @@ artifactoryPublish {
119124
publications ('mavenJava')
120125
}
121126

122-
123127
bintray {
124128
user = System.getenv('BINTRAY_USER')
125129
key = System.getenv('BINTRAY_KEY')

0 commit comments

Comments
 (0)