2021-09-17 00:10:29 -07:00
|
|
|
import com.hubspot.jinjava.Jinjava;
|
|
|
|
|
import com.hubspot.jinjava.JinjavaConfig;
|
|
|
|
|
|
2020-08-06 23:57:39 -07:00
|
|
|
ext {
|
|
|
|
|
useJava = true
|
|
|
|
|
useCpp = true
|
|
|
|
|
baseId = 'wpimath'
|
|
|
|
|
groupId = 'edu.wpi.first.wpimath'
|
|
|
|
|
|
|
|
|
|
nativeName = 'wpimath'
|
2021-05-01 15:53:30 +00:00
|
|
|
devMain = 'edu.wpi.first.math.DevMain'
|
2020-08-06 23:57:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply from: "${rootDir}/shared/jni/setupBuild.gradle"
|
|
|
|
|
|
2020-09-06 20:53:57 -07:00
|
|
|
cppHeadersZip {
|
2022-06-11 21:07:15 -07:00
|
|
|
from('src/main/native/thirdparty/eigen/include') {
|
2020-09-06 20:53:57 -07:00
|
|
|
into '/'
|
|
|
|
|
}
|
2022-10-31 11:17:00 -05:00
|
|
|
from('src/main/native/thirdparty/gcem/include') {
|
|
|
|
|
into '/'
|
|
|
|
|
}
|
2023-11-13 19:50:42 -08:00
|
|
|
from("$buildDir/generated/source/proto/main/cpp") {
|
|
|
|
|
into '/wpimath/protobuf'
|
|
|
|
|
include '*.h'
|
|
|
|
|
}
|
2020-09-06 20:53:57 -07:00
|
|
|
}
|
|
|
|
|
|
2023-11-13 19:50:42 -08:00
|
|
|
cppHeadersZip.dependsOn generateProto
|
|
|
|
|
|
2020-08-06 23:57:39 -07:00
|
|
|
model {
|
|
|
|
|
components {
|
|
|
|
|
all {
|
|
|
|
|
it.sources.each {
|
|
|
|
|
it.exportedHeaders {
|
2022-06-11 21:07:15 -07:00
|
|
|
srcDirs 'src/main/native/include',
|
2022-10-31 11:17:00 -05:00
|
|
|
'src/main/native/thirdparty/eigen/include',
|
|
|
|
|
'src/main/native/thirdparty/gcem/include'
|
2020-08-06 23:57:39 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-23 21:47:06 -08:00
|
|
|
nativeUtils.exportsConfigs {
|
|
|
|
|
wpimath {
|
|
|
|
|
x64ExcludeSymbols = [
|
|
|
|
|
'_CT??_R0?AV_System_error',
|
|
|
|
|
'_CT??_R0?AVexception',
|
|
|
|
|
'_CT??_R0?AVfailure',
|
|
|
|
|
'_CT??_R0?AVruntime_error',
|
|
|
|
|
'_CT??_R0?AVsystem_error',
|
|
|
|
|
'_CTA5?AVfailure',
|
|
|
|
|
'_TI5?AVfailure',
|
|
|
|
|
'_CT??_R0?AVout_of_range',
|
|
|
|
|
'_CTA3?AVout_of_range',
|
|
|
|
|
'_TI3?AVout_of_range',
|
|
|
|
|
'_CT??_R0?AVbad_cast'
|
|
|
|
|
]
|
|
|
|
|
objectFilterClosure = { file ->
|
|
|
|
|
return file.name.endsWith('.pb.obj')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-06 23:57:39 -07:00
|
|
|
dependencies {
|
2023-11-17 11:45:04 -05:00
|
|
|
api project(":wpiunits")
|
2023-10-17 19:51:17 -07:00
|
|
|
api "org.ejml:ejml-simple:0.43.1"
|
2023-08-18 19:18:33 -07:00
|
|
|
api "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
|
|
|
|
|
api "com.fasterxml.jackson.core:jackson-core:2.15.2"
|
|
|
|
|
api "com.fasterxml.jackson.core:jackson-databind:2.15.2"
|
2023-12-21 12:30:45 +08:00
|
|
|
api "us.hebi.quickbuf:quickbuf-runtime:1.3.3"
|
2020-08-06 23:57:39 -07:00
|
|
|
}
|
|
|
|
|
|
2023-12-01 23:52:38 -05:00
|
|
|
sourceSets.main.java.srcDir "${projectDir}/src/generated/main/java"
|
2023-06-08 21:11:51 -07:00
|
|
|
|
|
|
|
|
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)
|