From dfa9c8045fae41168f72fca058721c8eb2575f8a Mon Sep 17 00:00:00 2001 From: Benjamin Deroche Date: Fri, 2 Aug 2024 11:30:38 +0200 Subject: [PATCH] Regenerate from zproject --- bindings/jni/build.gradle | 16 ++++++--- bindings/jni/czmq-jni-all/build.gradle | 1 - bindings/jni/czmq-jni-native/build.gradle | 6 ++-- bindings/jni/czmq-jni/build.gradle | 41 +++++++++++------------ doc/Makefile.am | 2 +- 5 files changed, 36 insertions(+), 30 deletions(-) diff --git a/bindings/jni/build.gradle b/bindings/jni/build.gradle index d3ecc8412..dd6386a73 100644 --- a/bindings/jni/build.gradle +++ b/bindings/jni/build.gradle @@ -5,15 +5,24 @@ ################################################################################ */ +buildscript { + configurations.configureEach { + resolutionStrategy { + force 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1' + } + exclude group: 'xerces', module: 'xercesImpl' + } +} + plugins { id 'java' id 'maven-publish' - id 'com.jfrog.artifactory' version '4.21.0' + id 'com.jfrog.artifactory' version '5.2.3' id 'com.jfrog.bintray' version '1.8.5' - id 'com.google.osdetector' version '1.7.0' + id 'com.google.osdetector' version '1.7.3' } -wrapper.gradleVersion = '7.5.1' +wrapper.gradleVersion = '8.9' subprojects { apply plugin: 'java' @@ -47,7 +56,6 @@ artifactory { repoKey = 'oss-snapshot-local' username = System.getenv('ARTIFACTORY_USERNAME') password = System.getenv('ARTIFACTORY_PASSWORD') - maven = true } } } diff --git a/bindings/jni/czmq-jni-all/build.gradle b/bindings/jni/czmq-jni-all/build.gradle index 215ee5ee5..42920eeb6 100644 --- a/bindings/jni/czmq-jni-all/build.gradle +++ b/bindings/jni/czmq-jni-all/build.gradle @@ -45,7 +45,6 @@ artifactoryPublish { publications ('mavenJava') } - bintray { user = System.getenv('BINTRAY_USER') key = System.getenv('BINTRAY_KEY') diff --git a/bindings/jni/czmq-jni-native/build.gradle b/bindings/jni/czmq-jni-native/build.gradle index 77e19ede3..0dd42a527 100644 --- a/bindings/jni/czmq-jni-native/build.gradle +++ b/bindings/jni/czmq-jni-native/build.gradle @@ -12,7 +12,7 @@ dependencies { // ------------------------------------------------------------------ // Build section -task copyLibs(type: Copy) { +tasks.register('copyLibs', type: Copy) { def libraryPaths = [] if (project.hasProperty('buildPrefix')) { if (osdetector.os == 'windows') { @@ -23,7 +23,7 @@ task copyLibs(type: Copy) { } def javaLibraryPaths = System.getProperty('java.library.path').split(File.pathSeparator).toList() - libraryPaths.addAll (javaLibraryPaths) + libraryPaths.addAll(javaLibraryPaths) libraryPaths.add('/usr/local/lib') if (osdetector.os == 'windows') { @@ -68,7 +68,7 @@ task copyLibs(type: Copy) { duplicatesStrategy = oldStrategy } -jar.baseName = "czmq-jni-${osdetector.classifier}" +jar.archiveBaseName = "czmq-jni-${osdetector.classifier}" jar.dependsOn copyLibs jar { diff --git a/bindings/jni/czmq-jni/build.gradle b/bindings/jni/czmq-jni/build.gradle index 3245b679b..dc9fca400 100644 --- a/bindings/jni/czmq-jni/build.gradle +++ b/bindings/jni/czmq-jni/build.gradle @@ -11,15 +11,15 @@ ext.hasNotEmptyProperty = { propertyName -> } dependencies { - implementation 'org.scijava:native-lib-loader:2.4.0' - testImplementation 'junit:junit:4.12' - testImplementation 'org.hamcrest:hamcrest-all:1.3' + implementation 'org.scijava:native-lib-loader:2.5.0' + testImplementation 'junit:junit:4.13.2' + testImplementation 'org.hamcrest:hamcrest:2.2' } // ------------------------------------------------------------------ // Build section -task generateJniHeaders(type: Exec, dependsOn: 'classes') { +tasks.register('generateJniHeaders', type: Exec, dependsOn: 'classes') { def classpath = sourceSets.main.output.classesDirs def appclasspath = configurations.runtimeClasspath.files*.getAbsolutePath().join(File.pathSeparator) def nativeIncludes = 'src/native/include' @@ -63,14 +63,14 @@ task generateJniHeaders(type: Exec, dependsOn: 'classes') { commandLine("javac", "-h", "$nativeIncludes", "-classpath", "$classpath${File.pathSeparator}$appclasspath", *jniClasses, *utilityClasses) } -tasks.withType(Test) { +tasks.withType(Test).configureEach { def defaultJavaLibraryPath = System.getProperty("java.library.path") if (osdetector.os == 'windows') { - def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : '' - extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\") - systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" + - "${extraJavaLibraryPath}${File.pathSeparator}" + - "${defaultJavaLibraryPath}" + def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : '' + extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\") + systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" + + "${extraJavaLibraryPath}${File.pathSeparator}" + + "${defaultJavaLibraryPath}" } else { def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix/lib" : '' systemProperty "java.library.path", "${projectDir}/build${File.pathSeparator}" + @@ -81,22 +81,22 @@ tasks.withType(Test) { } } -task initCMake(type: Exec, dependsOn: 'generateJniHeaders') { - workingDir 'build' +tasks.register('initCMake', type: Exec, dependsOn: 'generateJniHeaders') { + workingDir 'build' def prefixPath = hasNotEmptyProperty('buildPrefix') ? "-DCMAKE_PREFIX_PATH=$project.buildPrefix" : '' commandLine 'cmake', "$prefixPath", '..' } -task buildNative(type: Exec, dependsOn: 'initCMake') { +tasks.register('buildNative', type: Exec, dependsOn: 'initCMake') { if (osdetector.os == 'windows') { commandLine 'cmake', - '--build', 'build', + '--build', 'build', '--config', 'Release', '--target', 'czmqjni', - '--', '-verbosity:Minimal', '-maxcpucount' + '--', '-verbosity:Minimal', '-maxcpucount' } else { commandLine 'cmake', - '--build', 'build' + '--build', 'build' } } @@ -106,13 +106,13 @@ test.dependsOn buildNative // ------------------------------------------------------------------ // Install and Publish section -task sourcesJar(type: Jar, dependsOn: 'classes') { - classifier = 'sources' +tasks.register('sourcesJar', type: Jar, dependsOn: 'classes') { + archiveClassifier = 'sources' from sourceSets.main.allSource } -task javadocJar(type: Jar, dependsOn: 'javadoc') { - classifier = 'javadoc' +tasks.register('javadocJar', type: Jar, dependsOn: 'javadoc') { + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -148,7 +148,6 @@ artifactoryPublish { publications ('mavenJava') } - bintray { user = System.getenv('BINTRAY_USER') key = System.getenv('BINTRAY_KEY') diff --git a/doc/Makefile.am b/doc/Makefile.am index 64b574722..a236b11d2 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -11,7 +11,7 @@ MAN1 = zmakecert.1 MAN3 = zactor.3 zargs.3 zarmour.3 zcert.3 zcertstore.3 zchunk.3 zclock.3 zconfig.3 zdigest.3 zdir.3 zdir_patch.3 zfile.3 zframe.3 zhash.3 zhashx.3 ziflist.3 zlist.3 zlistx.3 zloop.3 zmsg.3 zpoller.3 zproc.3 zsock.3 zstr.3 zsys.3 ztimerset.3 ztrie.3 zuuid.3 zhttp_client.3 zhttp_server.3 zhttp_server_options.3 zhttp_request.3 zhttp_response.3 zosc.3 zauth.3 zbeacon.3 zgossip.3 zmonitor.3 zproxy.3 zrex.3 # Project overview, written by a human after initial skeleton: # NOTE: stub doc/czmq.adoc is generated by GSL from project.xml -# and then comitted to SCM and maintained manually to describe the +# and then committed to SCM and maintained manually to describe the # project (section 7 = Overview, conventions, and miscellaneous). MAN7 = czmq.7 MAN_DOC = $(MAN1) $(MAN3) $(MAN7)