apply plugin: 'cpp' apply plugin: 'google-test-test-suite' apply plugin: 'edu.wpi.first.NativeUtils' apply from: "${rootDir}/shared/config.gradle" apply from: "${rootDir}/shared/javacommon.gradle" // Windows specific functionality to export all symbols from a binary automatically nativeUtils { exportsConfigs { "${nativeName}" {} } } model { components { "${nativeName}"(NativeLibrarySpec) { sources { cpp { source { srcDirs 'src/main/native/cpp' include '**/*.cpp' } exportedHeaders { srcDirs 'src/main/native/include' include "**/*.h" } } } if(project.hasProperty('includePhotonTargeting')) { binaries.all { lib project: ':photon-targeting', library: 'photontargeting', linkage: 'shared' } } nativeUtils.useRequiredLibrary(it, "wpilib_shared") nativeUtils.useRequiredLibrary(it, "apriltag_shared") nativeUtils.useRequiredLibrary(it, "opencv_shared") } } testSuites { "${nativeName}Test"(GoogleTestTestSuiteSpec) { for(NativeComponentSpec c : $.components) { if (c.name == nativeName) { testing c break } } sources { cpp { source { srcDirs 'src/test/native/cpp' include '**/*.cpp' } exportedHeaders { srcDirs 'src/test/native/include', 'src/main/native/cpp' } } } if(project.hasProperty('includePhotonTargeting')) { binaries.all { lib project: ':photon-targeting', library: 'photontargeting', linkage: 'shared' } } nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared") nativeUtils.useRequiredLibrary(it, "googletest_static") nativeUtils.useRequiredLibrary(it, "apriltag_shared") nativeUtils.useRequiredLibrary(it, "opencv_shared") } } } apply from: "${rootDir}/shared/publish.gradle"