mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user