diff --git a/buildSrc/src/main/groovy/SingleNativeBuild.groovy b/buildSrc/src/main/groovy/SingleNativeBuild.groovy index 0f2a287d91..f37fc57719 100644 --- a/buildSrc/src/main/groovy/SingleNativeBuild.groovy +++ b/buildSrc/src/main/groovy/SingleNativeBuild.groovy @@ -62,7 +62,7 @@ class SingleNativeBuild implements Plugin { components.each { component -> if (component.name == "${nativeName}Base") { base = (NativeLibrarySpec) component - } else if (component.name == "${nativeName}") { + } else if (component.name == "${nativeName}" || component.name == "${nativeName}JNI") { subs << component } } diff --git a/cscore/build.gradle b/cscore/build.gradle index 34c333c9a0..77331a6d3a 100644 --- a/cscore/build.gradle +++ b/cscore/build.gradle @@ -100,6 +100,26 @@ model { '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', '_TI5?AVfailure'] } + cscoreJNI(ExportsConfig) { + x86SymbolFilter = { symbols -> + def retList = [] + symbols.each { symbol -> + if (symbol.startsWith('CS_')) { + retList << symbol + } + } + return retList + } + x64SymbolFilter = { symbols -> + def retList = [] + symbols.each { symbol -> + if (symbol.startsWith('CS_')) { + retList << symbol + } + } + return retList + } + } } components { examplesMap.each { key, value -> diff --git a/hal/build.gradle b/hal/build.gradle index af681a9b97..2f49ee5c99 100644 --- a/hal/build.gradle +++ b/hal/build.gradle @@ -179,5 +179,25 @@ model { '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', '_TI5?AVfailure'] } + halJNI(ExportsConfig) { + x86SymbolFilter = { symbols -> + def retList = [] + symbols.each { symbol -> + if (symbol.startsWith('HAL_') || symbol.startsWith('HALSIM_')) { + retList << symbol + } + } + return retList + } + x64SymbolFilter = { symbols -> + def retList = [] + symbols.each { symbol -> + if (symbol.startsWith('HAL_') || symbol.startsWith('HALSIM_')) { + retList << symbol + } + } + return retList + } + } } } diff --git a/ntcore/build.gradle b/ntcore/build.gradle index 0166786861..659b0f9214 100644 --- a/ntcore/build.gradle +++ b/ntcore/build.gradle @@ -21,6 +21,26 @@ model { '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', '_TI5?AVfailure'] } + ntcoreJNI(ExportsConfig) { + x86SymbolFilter = { symbols -> + def retList = [] + symbols.each { symbol -> + if (symbol.startsWith('NT_')) { + retList << symbol + } + } + return retList + } + x64SymbolFilter = { symbols -> + def retList = [] + symbols.each { symbol -> + if (symbol.startsWith('NT_')) { + retList << symbol + } + } + return retList + } + } } } diff --git a/shared/jni/setupBuild.gradle b/shared/jni/setupBuild.gradle index 2549b0bc52..5094414390 100644 --- a/shared/jni/setupBuild.gradle +++ b/shared/jni/setupBuild.gradle @@ -162,7 +162,6 @@ model { it.buildable = false return } - lib library: "${nativeName}", linkage: 'static' lib project: ':wpiutil', library: 'wpiutil', linkage: 'static' if (project.hasProperty('jniSplitSetup')) { jniSplitSetup(it)