[wpimath] Create separate archive with just units headers (#5383)

This will allow very low level deps to use the same units library we ship with wpilib
This commit is contained in:
Thad House
2023-06-08 21:11:51 -07:00
committed by GitHub
parent 901ab693d4
commit d5ed9fb859
2 changed files with 23 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ def outputsFolder = file("$buildDir/outputs")
def baseArtifactId = nativeName
def artifactGroupId = "edu.wpi.first.${nativeName}"
def zipBaseName = "_GROUP_edu_wpi_first_${nativeName}_ID_${nativeName}-cpp_CLS"
ext.zipBaseName = zipBaseName
def jniBaseName = "_GROUP_edu_wpi_first_${nativeName}_ID_${nativeName}-jni_CLS"
def jniCvStaticBaseName = "_GROUP_edu_wpi_first_${nativeName}_ID_${nativeName}-jnicvstatic_CLS"

View File

@@ -125,3 +125,25 @@ task generateNat() {
sourceSets.main.java.srcDir "${buildDir}/generated/java"
compileJava.dependsOn generateNumbers
compileJava.dependsOn generateNat
task unitsHeaders(type: Zip) {
destinationDirectory = file("$buildDir/outputs")
archiveBaseName = zipBaseName
archiveClassifier = "units"
from(licenseFile) {
into '/'
}
ext.includeDirs = [
project.file('src/main/native/include/units')
]
ext.includeDirs.each {
from(it) {
into '/units'
}
}
}
addTaskToCopyAllOutputs(unitsHeaders)