Add photon.pb.h/PhotonVersion to cpp headers zip & create combined sources zip (#1335)

Combined sources zip is useful for robotpy to build both targeting & lib in the same build
This commit is contained in:
Matt
2024-06-09 17:18:57 -04:00
committed by GitHub
parent 7b19a951ca
commit 5289948b83
4 changed files with 121 additions and 14 deletions

View File

@@ -6,6 +6,10 @@ def baseArtifactId = nativeName
def artifactGroupId = 'org.photonvision'
def zipBaseName = "_GROUP_org_photonvision_${baseArtifactId}_ID_${baseArtifactId}-cpp_CLS"
// Quick hack to make this name visible to photon-lib for combined
ext.zipBaseName = zipBaseName
ext.artifactGroupId = artifactGroupId
def licenseFile = file("$rootDir/LICENCE")
task cppSourcesZip(type: Zip) {
@@ -17,15 +21,17 @@ task cppSourcesZip(type: Zip) {
into '/'
}
from('src/main/native/cpp') {
println("Sources: from $projectDir ")
from("$projectDir/src/main/native/cpp") {
into '/'
}
// assume we will always have proto sources
from("$buildDir/generated/source/proto/main/cpp") {
into '/'
// Only include generated C++ source files, not headers
include "**/*.cc", "**/*.cpp"
}
dependsOn generateProto
}
@@ -47,6 +53,14 @@ task cppHeadersZip(type: Zip) {
into '/'
}
}
// assume we will always have proto sources
from("$buildDir/generated/source/proto/main/cpp") {
into '/'
// Only include generated C++ headers
include "**/*.h"
}
dependsOn generateProto
}
artifacts {