mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[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:
@@ -4,7 +4,7 @@ apply plugin: 'jacoco'
|
||||
|
||||
def baseArtifactId = project.baseId
|
||||
def artifactGroupId = project.groupId
|
||||
def javaBaseName = "_GROUP_${project.groupId.replace('.', '_')}_ID_${project.baseId}-java_CLS"
|
||||
def javaBaseName = makeZipBaseName(artifactGroupId, "${baseArtifactId}-java")
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ def outputsFolder = file("$buildDir/outputs")
|
||||
|
||||
def baseArtifactId = nativeName
|
||||
def artifactGroupId = "org.wpilib.${nativeName}"
|
||||
def zipBaseName = "_GROUP_org_wpilib_${nativeName}_ID_${nativeName}-cpp_CLS"
|
||||
def zipBaseName = makeZipBaseName(artifactGroupId, "${baseArtifactId}-cpp")
|
||||
|
||||
def licenseFile = file("$rootDir/license.md")
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ def outputsFolder = file("$buildDir/outputs")
|
||||
|
||||
def baseArtifactId = nativeName
|
||||
def artifactGroupId = "org.wpilib.${nativeName}"
|
||||
def zipBaseName = "_GROUP_org_wpilib_${nativeName}_ID_${nativeName}-cpp_CLS"
|
||||
def zipBaseName = makeZipBaseName(artifactGroupId, "${baseArtifactId}-cpp")
|
||||
ext.zipBaseName = zipBaseName
|
||||
def jniCvStaticBaseName = "_GROUP_org_wpilib_${nativeName}_ID_${nativeName}-jnicvstatic_CLS"
|
||||
def jniCvStaticBaseName = makeZipBaseName(artifactGroupId, "${nativeName}-jnicvstatic")
|
||||
|
||||
def licenseFile = file("$rootDir/license.md")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ apply plugin: 'maven-publish'
|
||||
|
||||
def baseArtifactId = pluginName
|
||||
def artifactGroupId = 'org.wpilib.halsim'
|
||||
def zipBaseName = "_GROUP_org_wpilib_halsim_ID_${pluginName}_CLS"
|
||||
def zipBaseName = makeZipBaseName(artifactGroupId, baseArtifactId)
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user