[build] Refactor zip base name generation for consistency (#8831)

Right now, the `zipBaseName` variable in various publish.gradle files
contains the group ID and artifact ID for use by the combiner, however,
they are also duplicated in `artifactGroupId` and `baseArtifactId`,
leading to potential mistakes if they aren't updated together. This
fixes that by adding a new utility function `makeZipBaseName` to
automatically create the right name given a group ID and artifact ID.
This also fixes publishing for thirdparty subprojects, which didn't
update `zipBaseName`.
This commit is contained in:
Gold856
2026-04-27 14:46:11 -04:00
committed by GitHub
parent 29beacbefe
commit 3bf67edc34
22 changed files with 33 additions and 29 deletions

View File

@@ -5,9 +5,9 @@ def baseTemplatesArtifactId = 'templates'
def baseCommandsArtifactId = 'commands'
def artifactGroupId = 'org.wpilib.wpilibj'
def examplesZipBaseName = '_GROUP_org_wpilib_wpilibj_ID_examples_CLS'
def templatesZipBaseName = '_GROUP_org_wpilib_wpilibj_ID_templates_CLS'
def commandsZipBaseName = '_GROUP_org_wpilib_wpilibj_ID_commands_CLS'
def examplesZipBaseName = makeZipBaseName(artifactGroupId, baseExamplesArtifactId)
def templatesZipBaseName = makeZipBaseName(artifactGroupId, baseTemplatesArtifactId)
def commandsZipBaseName = makeZipBaseName(artifactGroupId, baseCommandsArtifactId)
def outputsFolder = file("$project.buildDir/outputs")