Skip to content

Commit

Permalink
Regenerate from zproject
Browse files Browse the repository at this point in the history
  • Loading branch information
benjdero committed Aug 2, 2024
1 parent f36c5ed commit 7045197
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bindings/jni/czmq-jni-native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
// ------------------------------------------------------------------
// Build section

tasks.register('copyLibs', type: Copy) {
tasks.register('copyLibs', Copy) {
def libraryPaths = []
if (project.hasProperty('buildPrefix')) {
if (osdetector.os == 'windows') {
Expand Down
15 changes: 10 additions & 5 deletions bindings/jni/czmq-jni/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ dependencies {
// ------------------------------------------------------------------
// Build section

tasks.register('generateJniHeaders', type: Exec, dependsOn: 'classes') {
tasks.register('generateJniHeaders', Exec) {
dependsOn 'classes'
def classpath = sourceSets.main.output.classesDirs
def appclasspath = configurations.runtimeClasspath.files*.getAbsolutePath().join(File.pathSeparator)
def nativeIncludes = 'src/native/include'
Expand Down Expand Up @@ -81,13 +82,15 @@ tasks.withType(Test).configureEach {
}
}

tasks.register('initCMake', type: Exec, dependsOn: 'generateJniHeaders') {
tasks.register('initCMake', Exec) {
dependsOn 'generateJniHeaders'
workingDir 'build'
def prefixPath = hasNotEmptyProperty('buildPrefix') ? "-DCMAKE_PREFIX_PATH=$project.buildPrefix" : ''
commandLine 'cmake', "$prefixPath", '..'
}

tasks.register('buildNative', type: Exec, dependsOn: 'initCMake') {
tasks.register('buildNative', Exec) {
dependsOn 'initCMake'
if (osdetector.os == 'windows') {
commandLine 'cmake',
'--build', 'build',
Expand All @@ -106,12 +109,14 @@ test.dependsOn buildNative
// ------------------------------------------------------------------
// Install and Publish section

tasks.register('sourcesJar', type: Jar, dependsOn: 'classes') {
tasks.register('sourcesJar', Jar) {
dependsOn 'classes'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

tasks.register('javadocJar', type: Jar, dependsOn: 'javadoc') {
tasks.register('javadocJar', Jar) {
dependsOn 'javadoc'
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
Expand Down

0 comments on commit 7045197

Please sign in to comment.