From 941275df3a9ec2f2b6e67c4afb287cd84e249f8f Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 12 Oct 2022 20:39:12 +0200 Subject: [PATCH] Add jenkinsfile for pipeline build and dockerfile for build Signed-off-by: brian --- cavis-native/cavis-native-lib/build.gradle | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/cavis-native/cavis-native-lib/build.gradle b/cavis-native/cavis-native-lib/build.gradle index f5c623d56..4cfef72f6 100644 --- a/cavis-native/cavis-native-lib/build.gradle +++ b/cavis-native/cavis-native-lib/build.gradle @@ -388,7 +388,7 @@ chipList.each { thisChip -> //} } - // Generates jnijavacpp.cpp and jniNativeLibrary.cpp, compiles and links it + // Create Jar with classifier tasks.getByName("${thisChip}SupportJar") { Jar thisTask -> dependsOn "javacpp${thisChip.capitalize()}SupportBuildCompiler" dependsOn "javacpp${thisChip.capitalize()}SupportBuildCommand" @@ -405,7 +405,7 @@ chipList.each { thisChip -> } return exclude } - into "${javacppPlatform}/" //we need it in a platform, that javacpp Loader understands + into "${javacppPlatform}/" //path within jar, we need it in a platform, that javacpp Loader understands } from(sourceSets.getByName("${thisChip}Support").getOutput()) { @@ -466,34 +466,36 @@ javadoc { if(! osdetector.os.startsWith("windows")) { - tasks.getByName("publish") { - enabled = true - } + //tasks.getByName("publish") { + // enabled = false + // } tasks.getByName("generatePomFileForMavenJavaPublication") { enabled = true } tasks.getByName("publishMavenJavaPublicationToLocalRemoteRepository") { enabled = true } - chipList.each {thisChip -> + chipList.each { thisChip -> artifacts { archives tasks.getByName("${thisChip}SupportJar") } } +} - chipList.each { thisChip -> - publishing { - publications { - mavenJava(MavenPublication) { - logger.quiet("Adding artifacts from task {} to the publication.", "${thisChip}SupportJar" ) - artifact tasks.getByName("${thisChip}SupportJar") - } + +chipList.each { thisChip -> + publishing { + publications { + mavenJava(MavenPublication) { + logger.quiet("Adding artifacts from task {} to the publication.", "${thisChip}SupportJar" ) + artifact tasks.getByName("${thisChip}SupportJar") } } } } + if( osdetector.os.startsWith("windows")) { FileCollection collection = layout.files { file("build/libs/").listFiles() }