mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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.
63 lines
1.4 KiB
Groovy
63 lines
1.4 KiB
Groovy
apply plugin: 'maven-publish'
|
|
|
|
def baseArtifactId = 'googletest-cpp'
|
|
def artifactGroupId = 'org.wpilib.thirdparty.googletest'
|
|
def zipBaseName = '_GROUP_edu_wpi_first_thirdparty_googletest_ID_googletest-cpp_CLS'
|
|
|
|
def outputsFolder = file("$project.buildDir/outputs")
|
|
|
|
task cppSourcesZip(type: Zip) {
|
|
destinationDirectory = outputsFolder
|
|
archiveBaseName = zipBaseName
|
|
archiveClassifier = "sources"
|
|
|
|
from(licenseFile) {
|
|
into '/'
|
|
}
|
|
|
|
from('src') {
|
|
into '/'
|
|
}
|
|
}
|
|
|
|
task cppHeadersZip(type: Zip) {
|
|
destinationDirectory = outputsFolder
|
|
archiveBaseName = zipBaseName
|
|
archiveClassifier = "headers"
|
|
|
|
from(licenseFile) {
|
|
into '/'
|
|
}
|
|
|
|
from('include') {
|
|
into '/'
|
|
}
|
|
}
|
|
|
|
build.dependsOn cppHeadersZip
|
|
build.dependsOn cppSourcesZip
|
|
|
|
addTaskToCopyAllOutputs(cppHeadersZip)
|
|
addTaskToCopyAllOutputs(cppSourcesZip)
|
|
|
|
model {
|
|
publishing {
|
|
def googletestTaskList = createComponentZipTasks($.components, ['googletest'], zipBaseName, Zip, project, includeStandardZipFormat)
|
|
|
|
publications {
|
|
cpp(MavenPublication) {
|
|
googletestTaskList.each {
|
|
artifact it
|
|
}
|
|
|
|
artifact cppHeadersZip
|
|
artifact cppSourcesZip
|
|
|
|
artifactId = baseArtifactId
|
|
groupId = artifactGroupId
|
|
version = wpilibVersioning.version.get()
|
|
}
|
|
}
|
|
}
|
|
}
|