Files
allwpilib/thirdparty/catch2/publish.gradle
PJ Reiniger c6f54e963c [build] Fixup maven publishing (#8753)
This primarily fixes up the bazel publishing to match the gradle
publishing again, as some new libraries were added but not hooked up to
the maven publishing.

During the process, I noticed that the 3rd party libraries (googletest,
catch2, and imgui_suite) were still getting published on the old
`edu.wpi` namespace. I tried to clean up all the other references to
that that I could. Note: opencv and libssh are handled outside
`allwpilib` so they need to be updated separately.
2026-04-11 13:52:43 -07:00

63 lines
1.4 KiB
Groovy

apply plugin: 'maven-publish'
def baseArtifactId = 'catch2-cpp'
def artifactGroupId = 'org.wpilib.thirdparty.catch2'
def zipBaseName = '_GROUP_edu_wpi_first_thirdparty_catch2_ID_catch2-cpp_CLS'
def outputsFolder = file("$project.buildDir/outputs")
task cppSourcesZip(type: Zip) {
destinationDirectory = outputsFolder
archiveBaseName = zipBaseName
archiveClassifier = "sources"
from(licenseFile) {
into '/'
}
from('src/main/native/cpp') {
into '/'
}
}
task cppHeadersZip(type: Zip) {
destinationDirectory = outputsFolder
archiveBaseName = zipBaseName
archiveClassifier = "headers"
from(licenseFile) {
into '/'
}
from('src/main/native/include') {
into '/'
}
}
build.dependsOn cppHeadersZip
build.dependsOn cppSourcesZip
addTaskToCopyAllOutputs(cppHeadersZip)
addTaskToCopyAllOutputs(cppSourcesZip)
model {
publishing {
def catch2TaskList = createComponentZipTasks($.components, ['catch2'], zipBaseName, Zip, project, includeStandardZipFormat)
publications {
cpp(MavenPublication) {
catch2TaskList.each {
artifact it
}
artifact cppHeadersZip
artifact cppSourcesZip
artifactId = baseArtifactId
groupId = artifactGroupId
version = wpilibVersioning.version.get()
}
}
}
}