Skip to content

Commit

Permalink
Yeet JNI
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Dec 24, 2023
1 parent 4a7de52 commit 70b732c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id "com.diffplug.spotless" version "6.22.0"
id "edu.wpi.first.NativeUtils" version "2024.6.1" apply false
id 'edu.wpi.first.GradleJni' version '1.1.0'
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
id "edu.wpi.first.GradleRIO" version "2024.1.1-beta-4"
id 'edu.wpi.first.WpilibTools' version '1.3.0'
Expand Down
47 changes: 0 additions & 47 deletions shared/javacpp/setupBuild.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apply plugin: 'cpp'
apply plugin: 'google-test-test-suite'
apply plugin: 'edu.wpi.first.NativeUtils'
apply plugin: 'edu.wpi.first.GradleJni'

apply from: "${rootDir}/shared/config.gradle"
apply from: "${rootDir}/shared/javacommon.gradle"
Expand Down Expand Up @@ -96,52 +95,6 @@ model {
nativeUtils.useRequiredLibrary(it, name)
}
}
"${nativeName}JNI"(JniNativeLibrarySpec) {
baseName = nativeName + 'jni'

enableCheckTask !project.hasProperty('skipJniCheck')
javaCompileTasks << compileJava
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.roborio)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm32)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64)

sources {
cpp {
source {
srcDirs 'src/main/native/cpp'
if (project.hasProperty('generatedSources')) {
srcDir generatedSources
}
include '**/jni/**/*.cpp'
}
exportedHeaders {
srcDir 'src/main/native/include'
if (project.hasProperty('generatedHeaders')) {
srcDir generatedHeaders
}
include '**/*.h'
}
}
}

binaries.all {
if (it instanceof StaticLibraryBinarySpec) {
it.buildable = false
return
}
lib library: "${nativeName}", linkage: 'shared'
if (!project.hasProperty('noWpiutil')) {
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
}
if (project.hasProperty('jniSplitSetup')) {
jniSplitSetup(it)
}
}

if(project.hasProperty("jni_native_libs")) jni_native_libs.each { name ->
nativeUtils.useRequiredLibrary(it, name)
}
}
}
testSuites {
"${nativeName}Test"(GoogleTestTestSuiteSpec) {
Expand Down

0 comments on commit 70b732c

Please sign in to comment.