[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.
This commit is contained in:
PJ Reiniger
2026-04-11 16:52:43 -04:00
committed by GitHub
parent 9ea63c7fd6
commit c6f54e963c
21 changed files with 72 additions and 37 deletions

View File

@@ -1,10 +1,26 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_static_library")
load("//shared/bazel/rules:packaging.bzl", "package_static_cc_project")
cc_library(
name = "catch2.static",
wpilib_cc_library(
name = "catch2",
srcs = glob(["src/main/native/cpp/**"]),
hdrs = glob(["src/main/native/include/**"]),
include_license_files = True,
includes = ["src/main/native/include"],
strip_include_prefix = "src/main/native/include",
visibility = ["//visibility:public"],
)
wpilib_cc_static_library(
name = "static/catch2",
visibility = ["//visibility:public"],
deps = [
":catch2",
],
)
package_static_cc_project(
name = "catch2",
maven_artifact_name = "catch2-cpp",
maven_group_id = "org.wpilib.thirdparty.catch2",
)

View File

@@ -1,7 +1,7 @@
apply plugin: 'maven-publish'
def baseArtifactId = 'catch2-cpp'
def artifactGroupId = 'edu.wpi.first.thirdparty.catch2'
def artifactGroupId = 'org.wpilib.thirdparty.catch2'
def zipBaseName = '_GROUP_edu_wpi_first_thirdparty_catch2_ID_catch2-cpp_CLS'
def outputsFolder = file("$project.buildDir/outputs")

View File

@@ -28,5 +28,5 @@ wpilib_cc_static_library(
package_static_cc_project(
name = "googletest",
maven_artifact_name = "googletest-cpp",
maven_group_id = "edu.wpi.first.thirdparty.googletest",
maven_group_id = "org.wpilib.thirdparty.googletest",
)

View File

@@ -1,7 +1,7 @@
apply plugin: 'maven-publish'
def baseArtifactId = 'googletest-cpp'
def artifactGroupId = 'edu.wpi.first.thirdparty.googletest'
def artifactGroupId = 'org.wpilib.thirdparty.googletest'
def zipBaseName = '_GROUP_edu_wpi_first_thirdparty_googletest_ID_googletest-cpp_CLS'
def outputsFolder = file("$project.buildDir/outputs")

View File

@@ -491,5 +491,5 @@ package_static_cc_project(
name = "imguiSuite",
architectures = host_architectures,
maven_artifact_name = "imguiSuite-cpp",
maven_group_id = "edu.wpi.first.thirdparty.imguiSuite",
maven_group_id = "org.wpilib.thirdparty.imguiSuite",
)

View File

@@ -1,7 +1,7 @@
apply plugin: 'maven-publish'
def baseArtifactId = 'imguiSuite-cpp'
def artifactGroupId = 'edu.wpi.first.thirdparty.imguiSuite'
def artifactGroupId = 'org.wpilib.thirdparty.imguiSuite'
def zipBaseName = '_GROUP_edu_wpi_first_thirdparty_imguiSuite_ID_imguiSuite-cpp_CLS'
def outputsFolder = file("$project.buildDir/outputs")