From f0cc5d9ca880468665aa3014c1731126fef017f9 Mon Sep 17 00:00:00 2001 From: Thad House Date: Mon, 7 Aug 2017 17:44:07 -0700 Subject: [PATCH] Adds an all artifact to the published libraries (#15) Better then the old desktop zips because it will include all artifacts built, not just specifically the desktop ones. Also, the individual artifacts are published as well so users can decide which artifacts they specifically want, and can help decrease download sizes. The cpp plugin will continue using the individual artifacts. --- publish.gradle | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/publish.gradle b/publish.gradle index fda3296f43..82e6353595 100644 --- a/publish.gradle +++ b/publish.gradle @@ -166,6 +166,25 @@ model { } }) + def allCppTask + if (!project.hasProperty('jenkinsBuild')) { + allCppTask = project.tasks.create("wpiutilAllZip", Zip) { + description = 'Creates a zip with all Cpp artifacts' + classifier = 'all' + baseName = 'zipcppwpiutilwpiutil' + destinationDir = outputsFolder + duplicatesStrategy = 'exclude' + + wpiutilTaskList.each { + it.outputs.files.each { + from project.zipTree(it) + } + dependsOn it + } + } + project.build.dependsOn allCppTask + } + publications { cpp(MavenPublication) { wpiutilTaskList.each { @@ -174,6 +193,10 @@ model { artifact cppHeadersZip artifact cppSourcesZip + if (!project.hasProperty('jenkinsBuild')) { + artifact allCppTask + } + artifactId = "${baseArtifactId}-cpp" groupId artifactGroupId version pubVersion