Compare commits

..

No commits in common. "1599355b1934b58ccc43400ab4256f1b387aee5d" and "74e7147c318711f574f940e41c94380987278c4c" have entirely different histories.

7 changed files with 40 additions and 138 deletions

View File

@ -8,20 +8,20 @@ jobs:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2025-22.04
- container: wpilib/roborio-cross-ubuntu:2024-22.04
artifact-name: Athena
build-options: "-Ponlylinuxathena"
- container: wpilib/raspbian-cross-ubuntu:bookworm-22.04
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
artifact-name: Arm32
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:bookworm-22.04
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
artifact-name: Arm64
build-options: "-Ponlylinuxarm64"
- container: wpilib/ubuntu-base:22.04
artifact-name: Linux
build-options: ""
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
@ -40,7 +40,7 @@ jobs:
build-host:
env:
MACOSX_DEPLOYMENT_TARGET: 13.3
MACOSX_DEPLOYMENT_TARGET: 13
strategy:
fail-fast: false
matrix:
@ -50,7 +50,7 @@ jobs:
architecture: x64
- os: macos-14
artifact-name: macOS
architecture: aarch64
architecture: x64
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
@ -74,7 +74,7 @@ jobs:
combine:
name: Combine
needs: [build-docker, build-host]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:

View File

@ -1,7 +1,7 @@
{
"fileName": "ExampleVendorJson.json",
"name": "ExampleVendorDep",
"version": "${version}",
"version": "0.0.1",
"frcYear": "2025",
"uuid": "Generate A Unique GUID https://guidgenerator.com/online-guid-generator.aspx and insert it here", This line is to purposely make this fail to parse
"mavenUrls": [
@ -10,20 +10,21 @@
"jsonUrl": "InsertSomeUrlHere",
"javaDependencies": [
{
"groupId": "${groupId}",
"artifactId": "${artifactId}-java",
"version": "${version}"
"groupId": "com.vendor.frc",
"artifactId": "Vendor-java",
"version": "0.0.1"
}
],
"jniDependencies": [
{
"groupId": "${groupId}",
"artifactId": "${artifactId}-driver",
"version": "${version}",
"groupId": "com.vendor.frc",
"artifactId": "Vendor-driver",
"version": "0.0.1",
"skipInvalidPlatforms": true,
"isJar": false,
"validPlatforms": [
"windowsx86-64",
"windowsx86",
"linuxarm64",
"linuxx86-64",
"linuxathena",
@ -34,15 +35,16 @@
],
"cppDependencies": [
{
"groupId": "${groupId}",
"artifactId": "${artifactId}-cpp",
"version": "${version}",
"groupId": "com.vendor.frc",
"artifactId": "Vendor-cpp",
"version": "0.0.1",
"libName": "Vendor",
"headerClassifier": "headers",
"sharedLibrary": false,
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"windowsx86-64",
"windowsx86",
"linuxarm64",
"linuxx86-64",
"linuxathena",
@ -51,15 +53,16 @@
]
},
{
"groupId": "${groupId}",
"artifactId": "${artifactId}-driver",
"version": "${version}",
"groupId": "com.vendor.frc",
"artifactId": "Vendor-driver",
"version": "0.0.1",
"libName": "VendorDriver",
"headerClassifier": "headers",
"sharedLibrary": false,
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"windowsx86-64",
"windowsx86",
"linuxarm64",
"linuxx86-64",
"linuxathena",

View File

@ -1,18 +1,13 @@
import edu.wpi.first.toolchain.*
plugins {
id 'cpp'
id 'java'
id 'google-test'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2025.0'
id 'edu.wpi.first.NativeUtils' version '2025.9.0'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
id 'edu.wpi.first.NativeUtils' version '2025.3.0'
id 'edu.wpi.first.GradleJni' version '1.1.0'
id 'edu.wpi.first.GradleVsCode' version '2.1.0'
}
// WPILib Version
ext.wpilibVersion = "2025.+"
repositories {
mavenCentral()
}
@ -26,55 +21,25 @@ java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
var javaVersion = "17"
// Apply C++ configuration
apply from: 'config.gradle'
// Apply Java configuration
dependencies {
implementation "edu.wpi.first.cscore:cscore-java:$wpilibVersion"
implementation "edu.wpi.first.cameraserver:cameraserver-java:$wpilibVersion"
implementation "edu.wpi.first.ntcore:ntcore-java:$wpilibVersion"
implementation "edu.wpi.first.wpilibj:wpilibj-java:$wpilibVersion"
implementation "edu.wpi.first.wpiutil:wpiutil-java:$wpilibVersion"
implementation "edu.wpi.first.wpimath:wpimath-java:$wpilibVersion"
implementation "edu.wpi.first.wpiunits:wpiunits-java:$wpilibVersion"
implementation "edu.wpi.first.hal:hal-java:$wpilibVersion"
implementation 'edu.wpi.first.cscore:cscore-java:2025.+'
implementation 'edu.wpi.first.cameraserver:cameraserver-java:2025.+'
implementation 'edu.wpi.first.ntcore:ntcore-java:2025.+'
implementation 'edu.wpi.first.wpilibj:wpilibj-java:2025.+'
implementation 'edu.wpi.first.wpiutil:wpiutil-java:2025.+'
implementation 'edu.wpi.first.wpimath:wpimath-java:2025.+'
implementation 'edu.wpi.first.wpiunits:wpiunits-java:2025.+'
implementation 'edu.wpi.first.hal:hal-java:2025.+'
implementation "org.ejml:ejml-simple:0.43.1"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
implementation "com.fasterxml.jackson.core:jackson-core:2.15.2"
implementation "com.fasterxml.jackson.core:jackson-databind:2.15.2"
implementation 'edu.wpi.first.thirdparty.frc2025.opencv:opencv-java:4.10.0-2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
// Set up java tests
test {
useJUnitPlatform()
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
testLogging {
events "failed"
exceptionFormat "full"
}
}
if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxarm32') || project.hasProperty('onlylinuxarm64') || project.hasProperty('onlywindowsarm64') || project.hasProperty('onlylinuxsystemcore')) {
test.enabled = false
}
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
options.encoding = 'UTF-8'
}
// Setup Javadocs to link back to WPILib docs
javadoc {
options {
links "https://docs.oracle.com/en/java/javase/$javaVersion/docs/api/", 'https://github.wpilib.org/allwpilib/docs/release/java/'
}
implementation 'edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:4.8.0-4'
}
// Set up exports properly
@ -92,12 +57,6 @@ nativeUtils {
}
}
ext.getCurrentArch = {
return NativePlatforms.desktop
}
def systemArch = getCurrentArch()
model {
components {
Vendor(NativeLibrarySpec) {
@ -151,15 +110,6 @@ model {
binaries.all {
lib library: 'VendorDriver', linkage: 'shared'
def arch = it.targetPlatform.name
if (systemArch == arch && it.buildType.name == 'debug') {
def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib'
test.dependsOn it.tasks.install
test.systemProperty 'java.library.path', filePath
test.environment 'LD_LIBRARY_PATH', filePath
test.workingDir filePath
}
}
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared", "googletest_static")
@ -172,6 +122,7 @@ model {
include '**/*.cpp'
}
}
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared", "googletest_static")
}
}
@ -180,5 +131,5 @@ model {
apply from: 'publish.gradle'
wrapper {
gradleVersion '8.11'
gradleVersion '8.10.2'
}

View File

@ -8,10 +8,10 @@ nativeUtils.withCrossLinuxArm64()
nativeUtils {
wpi {
configureDependencies {
wpiVersion = wpilibVersion
opencvYear = "frc2025"
wpiVersion = "2025.+"
opencvYear = "frc2024"
niLibVersion = "2025.0.0"
opencvVersion = "4.10.0-2"
opencvVersion = "4.8.0-4"
}
}
}

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@ -1,12 +1,7 @@
import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'maven-publish'
ext.licenseFile = files("$rootDir/LICENSE.txt")
def templateVendorFile = "ExampleVendorJson.json"
def pubVersion = '0.0.1'
def outputsFolder = file("$buildDir/outputs")
@ -132,32 +127,6 @@ task outputJavadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}
// Apply template variables from the vendordep file.
// Replaces ${VARIABLE} with VARIABLE: value in expand()
task vendordepJson() {
description = 'Builds the vendordep json file.'
group = 'Build'
outputs.file("$buildDir/repos/$templateVendorFile")
copy {
from templateVendorFile
into "$buildDir/repos/"
expand(version: pubVersion,
groupId: artifactGroupId,
artifactId: baseArtifactId)
}
}
task vendordepJsonZip(type: Zip) {
destinationDirectory = outputsFolder
archiveBaseName = "vendordepJson"
from("$buildDir/repos/$templateVendorFile") {
into '/'
}
dependsOn vendordepJson
}
artifacts {
archives sourcesJar
archives javadocJar
@ -169,12 +138,10 @@ artifacts {
addTaskToCopyAllOutputs(outputSourcesJar)
addTaskToCopyAllOutputs(outputJavadocJar)
addTaskToCopyAllOutputs(outputJar)
addTaskToCopyAllOutputs(vendordepJsonZip)
build.dependsOn outputSourcesJar
build.dependsOn outputJavadocJar
build.dependsOn outputJar
build.dependsOn vendordepJsonZip
libraryBuild.dependsOn build
@ -233,14 +200,6 @@ model {
groupId artifactGroupId
version pubVersion
}
vendordep(MavenPublication) {
artifact vendordepJsonZip
artifactId = "${baseArtifactId}-vendordep"
groupId artifactGroupId
version pubVersion
}
}
}
}

View File

@ -1,11 +0,0 @@
package com.vendor.jni;
import org.junit.jupiter.api.Test;
public class VendorJNITest {
@Test
void jniLinkTest() {
// Test to verify that the JNI test link works correctly.
VendorJNI.initialize();
}
}