Skip to content

Commit e0ded7b

Browse files
committed
v1.0 (some issues)
1 parent 34ce6f9 commit e0ded7b

27 files changed

Lines changed: 2305 additions & 287 deletions

ExampleVendorJson.json

Lines changed: 0 additions & 71 deletions
This file was deleted.

TelemetryKit.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"fileName": "TelemetryKit.json",
3+
"name": "TelemetryKit",
4+
"version": "1.0.0",
5+
"frcYear": "2026beta",
6+
"uuid": "bf2eaa28-c978-45c9-8b1e-206f7620bd79",
7+
"mavenUrls": [],
8+
"jsonUrl": "",
9+
"jniDependencies": [],
10+
"javaDependencies": [],
11+
"cppDependencies": [
12+
{
13+
"groupId": "dev.sticks.telemetrykit",
14+
"artifactId": "TelemetryKit-cpp",
15+
"version": "1.0.0",
16+
"libName": "TelemetryKit",
17+
"headerClassifier": "headers",
18+
"sharedLibrary": false,
19+
"skipInvalidPlatforms": true,
20+
"binaryPlatforms": [
21+
"windowsx86-64",
22+
"linuxarm64",
23+
"linuxx86-64",
24+
"linuxathena",
25+
"linuxarm32",
26+
"osxuniversal"
27+
]
28+
}
29+
]
30+
}

build.gradle

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,7 @@ javadoc {
8282
nativeUtils {
8383
exportsConfigs {
8484
// Main library is just default empty. This will export everything
85-
Vendor {
86-
}
87-
}
88-
privateExportsConfigs {
89-
// Only export explicit symbols from driver library
90-
VendorDriver {
91-
exportsFile = project.file("src/main/driver/symbols.txt")
85+
TelemetryKit {
9286
}
9387
}
9488
}
@@ -101,7 +95,7 @@ def systemArch = getCurrentArch()
10195

10296
model {
10397
components {
104-
Vendor(NativeLibrarySpec) {
98+
TelemetryKit(NativeLibrarySpec) {
10599
sources {
106100
cpp {
107101
source {
@@ -113,66 +107,18 @@ model {
113107
}
114108
}
115109
}
116-
binaries.all {
117-
lib library: 'VendorDriver', linkage: 'shared'
118-
}
119110
nativeUtils.useRequiredLibrary(it, 'wpilib_shared')
120111
}
121-
122-
VendorDriver(JniNativeLibrarySpec) {
123-
enableCheckTask true
124-
javaCompileTasks << compileJava
125-
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.roborio)
126-
// Leave these for future proofing
127-
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm32)
128-
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64)
129-
sources {
130-
cpp {
131-
source {
132-
srcDirs 'src/main/driver/cpp'
133-
include '**/*.cpp'
134-
}
135-
exportedHeaders {
136-
srcDirs 'src/main/driver/include'
137-
}
138-
}
139-
}
140-
141-
nativeUtils.useRequiredLibrary(it, "driver_shared")
142-
}
143112
}
144113
testSuites {
145-
VendorTest {
114+
TelemetryKitTest {
146115
sources.cpp {
147116
source {
148117
srcDir 'src/test/native/cpp'
149118
include '**/*.cpp'
150119
}
151120
}
152121

153-
binaries.all {
154-
lib library: 'VendorDriver', linkage: 'shared'
155-
156-
def arch = it.targetPlatform.name
157-
if (systemArch == arch && it.buildType.name == 'debug') {
158-
def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib'
159-
test.dependsOn it.tasks.install
160-
test.systemProperty 'java.library.path', filePath
161-
test.environment 'LD_LIBRARY_PATH', filePath
162-
test.workingDir filePath
163-
}
164-
}
165-
166-
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared", "googletest_static")
167-
}
168-
169-
VendorDriverTest {
170-
sources.cpp {
171-
source {
172-
srcDir 'src/test/driver/cpp'
173-
include '**/*.cpp'
174-
}
175-
}
176122
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared", "googletest_static")
177123
}
178124
}

publish.gradle

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ apply plugin: 'maven-publish'
55

66
ext.licenseFile = files("$rootDir/LICENSE.txt")
77

8-
def templateVendorFile = "ExampleVendorJson.json"
8+
def templateVendorFile = "TelemetryKit.json"
99

10-
def pubVersion = '0.0.1'
10+
def pubVersion = '1.0.0'
1111

1212
def outputsFolder = file("$buildDir/outputs")
1313

@@ -47,8 +47,8 @@ ext.addTaskToCopyAllOutputs = { task ->
4747
copyAllOutputs.from task.archiveFile
4848
}
4949

50-
def artifactGroupId = 'com.vendor.frc'
51-
def baseArtifactId = 'Vendor'
50+
def artifactGroupId = 'dev.sticks.telemetrykit'
51+
def baseArtifactId = 'TelemetryKit'
5252
def driverZipBaseName = "_GROUP_com_vendor_frc_ID_${baseArtifactId}-driver_CLS"
5353
def zipBaseName = "_GROUP_com_vendor_frc_ID_${baseArtifactId}-cpp_CLS"
5454
def javaBaseName = "_GROUP_com_vendor_frc_ID_${baseArtifactId}-java_CLS"
@@ -81,26 +81,10 @@ task cppSourceZip(type: Zip) {
8181
}
8282
}
8383

84-
task cppDriverHeadersZip(type: Zip) {
85-
destinationDirectory = outputsFolder
86-
archiveBaseName = driverZipBaseName
87-
archiveClassifier = "headers"
88-
89-
from(licenseFile) {
90-
into '/'
91-
}
92-
93-
from('src/main/driver/include') {
94-
into '/'
95-
}
96-
}
97-
9884
build.dependsOn cppHeadersZip
9985
addTaskToCopyAllOutputs(cppHeadersZip)
10086
build.dependsOn cppSourceZip
10187
addTaskToCopyAllOutputs(cppSourceZip)
102-
build.dependsOn cppDriverHeadersZip
103-
addTaskToCopyAllOutputs(cppDriverHeadersZip)
10488

10589
task sourcesJar(type: Jar, dependsOn: classes) {
10690
archiveClassifier = 'sources'
@@ -198,9 +182,7 @@ tasks.matching {it != cleanReleaseRepo}.all {it.dependsOn cleanReleaseRepo}
198182

199183
model {
200184
publishing {
201-
def taskList = createComponentZipTasks($.components, ['Vendor'], zipBaseName, Zip, project, includeStandardZipFormat)
202-
203-
def driverTaskList = createComponentZipTasks($.components, ['VendorDriver'], driverZipBaseName, Zip, project, includeStandardZipFormat)
185+
def taskList = createComponentZipTasks($.components, ['TelemetryKit'], zipBaseName, Zip, project, includeStandardZipFormat)
204186

205187
publications {
206188
cpp(MavenPublication) {
@@ -214,16 +196,8 @@ model {
214196
groupId = artifactGroupId
215197
version = pubVersion
216198
}
217-
driver(MavenPublication) {
218-
driverTaskList.each {
219-
artifact it
220-
}
221-
artifact cppDriverHeadersZip
199+
222200

223-
artifactId = "${baseArtifactId}-driver"
224-
groupId = artifactGroupId
225-
version = pubVersion
226-
}
227201

228202
java(MavenPublication) {
229203
artifact jar

src/main/driver/cpp/VendorJNI.cpp

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/main/driver/cpp/driversource.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/main/driver/include/driverheader.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/main/driver/symbols.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/main/java/com/vendor/jni/VendorJNI.java

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)