Skip to content

Commit

Permalink
[documentation] Remove ReplaceMeCommand examples
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Sep 9, 2024
1 parent 34e4587 commit f3f68a9
Show file tree
Hide file tree
Showing 44 changed files with 1 addition and 1,188 deletions.
24 changes: 0 additions & 24 deletions shared/examplecheck.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ task checkTemplates(type: Task) {
assert it.tags != null
assert it.foldername != null
assert it.gradlebase != null
assert it.commandversion != null
if (it.gradlebase == 'java') {
assert it.mainclass != null
}
Expand Down Expand Up @@ -95,35 +94,12 @@ task checkExamples(type: Task) {
assert it.tags.findAll { !tagList.contains(it) }.empty
assert it.foldername != null
assert it.gradlebase != null
assert it.commandversion != null
if (it.gradlebase == 'java') {
assert it.mainclass != null
}
}
}
}

task checkCommands(type: Task) {
doLast {
def parsedJson = new groovy.json.JsonSlurper().parseText(commandFile.text)
fileCheck(parsedJson, commandDirectory)
parsedJson.each {
assert it.name != null
assert it.description != null
assert it.tags != null
assert it.foldername != null
assert it.replacename != null
assert it.commandversion != null
if (project.isCppCommands) {
assert it.headers != null
assert !it.headers.isEmpty()
assert it.source != null
assert !it.source.isEmpty()
}
}
}
}

check.dependsOn checkTemplates
check.dependsOn checkExamples
check.dependsOn checkCommands
37 changes: 1 addition & 36 deletions wpilibcExamples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ nativeUtils.platformConfigs.named(nativeUtils.wpi.platforms.windowsx64).configur
}

ext {
sharedCvConfigs = examplesMap + templatesMap + [commands: []]
sharedCvConfigs = examplesMap + templatesMap
staticCvConfigs = [:]
useJava = false
useCpp = true
Expand All @@ -53,39 +53,6 @@ apply from: "${rootDir}/shared/opencv.gradle"

model {
components {
commands(NativeLibrarySpec) {
binaries.all { binary ->
if (binary in StaticLibraryBinarySpec) {
binary.buildable = false
return
}
lib project: ':wpilibNewCommands', library: 'wpilibNewCommands', linkage: 'shared'
lib project: ':romiVendordep', library: 'romiVendordep', linkage: 'shared'
lib project: ':xrpVendordep', library: 'xrpVendordep', linkage: 'shared'
lib project: ':apriltag', library: 'apriltag', linkage: 'shared'
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
lib project: ':wpimath', library: 'wpimath', linkage: 'shared'
project(':ntcore').addNtcoreDependency(binary, 'shared')
lib project: ':cscore', library: 'cscore', linkage: 'shared'
project(':hal').addHalDependency(binary, 'shared')
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
}
sources {
cpp {
source {
srcDirs = ['src/main/cpp/commands']
include '**/*.cpp'
}
exportedHeaders {
srcDirs 'src/main/cpp/commands'
include '**/*.h'
}
}
}
}

examplesMap.each { key, value ->
"${key}"(NativeExecutableSpec) {
targetBuildTypes 'debug'
Expand Down Expand Up @@ -258,8 +225,6 @@ ext {
templateFile = new File("$projectDir/src/main/cpp/templates/templates.json")
exampleDirectory = new File("$projectDir/src/main/cpp/examples/")
exampleFile = new File("$projectDir/src/main/cpp/examples/examples.json")
commandDirectory = new File("$projectDir/src/main/cpp/commands/")
commandFile = new File("$projectDir/src/main/cpp/commands/commands.json")
}

model {
Expand Down

This file was deleted.

29 changes: 0 additions & 29 deletions wpilibcExamples/src/main/cpp/commands/command2/ReplaceMeCommand2.h

This file was deleted.

210 changes: 0 additions & 210 deletions wpilibcExamples/src/main/cpp/commands/commands.json

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f3f68a9

Please sign in to comment.