blob: 659b0f92144eb8b504f8d51ca40b8cc2d8f392f0 [file] [log] [blame]
Brian Silverman41cdd3e2019-01-19 19:48:58 -08001ext {
2 nativeName = 'ntcore'
3 devMain = 'edu.wpi.first.ntcore.DevMain'
4}
5
6apply from: "${rootDir}/shared/jni/setupBuild.gradle"
7
8model {
9 // Exports config is a utility to enable exporting all symbols in a C++ library on windows to a DLL.
10 // This removes the need for DllExport on a library. However, the gradle C++ builder has a bug
11 // where some extra symbols are added that cannot be resolved at link time. This configuration
12 // lets you specify specific symbols to exlude from exporting.
13 exportsConfigs {
14 ntcore(ExportsConfig) {
15 x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
16 '_CT??_R0?AVbad_cast',
17 '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
18 '_TI5?AVfailure']
19 x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
20 '_CT??_R0?AVbad_cast',
21 '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
22 '_TI5?AVfailure']
23 }
24 ntcoreJNI(ExportsConfig) {
25 x86SymbolFilter = { symbols ->
26 def retList = []
27 symbols.each { symbol ->
28 if (symbol.startsWith('NT_')) {
29 retList << symbol
30 }
31 }
32 return retList
33 }
34 x64SymbolFilter = { symbols ->
35 def retList = []
36 symbols.each { symbol ->
37 if (symbol.startsWith('NT_')) {
38 retList << symbol
39 }
40 }
41 return retList
42 }
43 }
44 }
45}
46
47pmdMain {
48 pmdMain.enabled = false
49}