2018-04-29 13:29:07 -07:00
|
|
|
ext {
|
2022-10-08 10:01:31 -07:00
|
|
|
addNtcoreDependency = { binary, shared->
|
|
|
|
|
binary.lib project: ':ntcore', library: 'ntcore', linkage: shared
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addNtcoreJniDependency = { binary->
|
|
|
|
|
binary.lib project: ':ntcore', library: 'ntcoreJNIShared', linkage: 'shared'
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-29 13:29:07 -07:00
|
|
|
nativeName = 'ntcore'
|
|
|
|
|
devMain = 'edu.wpi.first.ntcore.DevMain'
|
2023-12-01 18:31:06 -05:00
|
|
|
generatedSources = "$projectDir/src/generated/main/native/cpp"
|
|
|
|
|
generatedHeaders = "$projectDir/src/generated/main/native/include"
|
2022-10-08 10:01:31 -07:00
|
|
|
jniSplitSetup = {
|
|
|
|
|
}
|
|
|
|
|
splitSetup = {
|
|
|
|
|
it.tasks.withType(CppCompile) {
|
|
|
|
|
it.includes 'src/main/native/cpp'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
exeSplitSetup = {
|
|
|
|
|
}
|
2018-04-29 13:29:07 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply from: "${rootDir}/shared/jni/setupBuild.gradle"
|
|
|
|
|
|
2022-05-07 10:54:14 -07:00
|
|
|
model {
|
|
|
|
|
components {}
|
|
|
|
|
binaries {
|
|
|
|
|
all {
|
|
|
|
|
if (!it.buildable || !(it instanceof NativeBinarySpec)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
2022-11-21 20:33:46 -08:00
|
|
|
if (it.component.name == "${nativeName}JNI") {
|
|
|
|
|
lib project: ':wpinet', library: 'wpinet', linkage: 'static'
|
|
|
|
|
lib project: ':wpiutil', library: 'wpiutil', linkage: 'static'
|
|
|
|
|
} else {
|
|
|
|
|
lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
|
|
|
|
|
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
|
|
|
|
}
|
2022-05-07 10:54:14 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-01 18:31:06 -05:00
|
|
|
sourceSets.main.java.srcDir "${projectDir}/src/generated/main/java"
|
2022-10-08 10:01:31 -07:00
|
|
|
|
|
|
|
|
cppHeadersZip {
|
|
|
|
|
from(generatedHeaders) {
|
|
|
|
|
into '/'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-19 17:59:14 -07:00
|
|
|
Action<List<String>> symbolFilter = { symbols ->
|
|
|
|
|
symbols.removeIf({ !it.startsWith('NT_') })
|
|
|
|
|
} as Action<List<String>>;
|
|
|
|
|
|
2019-06-28 14:09:10 -07:00
|
|
|
nativeUtils.exportsConfigs {
|
|
|
|
|
ntcore {
|
|
|
|
|
}
|
|
|
|
|
ntcoreJNI {
|
2021-09-19 17:59:14 -07:00
|
|
|
x64SymbolFilter = symbolFilter
|
2018-04-29 13:29:07 -07:00
|
|
|
}
|
|
|
|
|
}
|