mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Persuant to #1093, I added as many docstrings as I could, at least for things I knew about. Some of the classes I just suppressed the Javadoc warnings in because they aren't particularly useful to document. This gets us down to less than 100 Javadoc warnings in total. Docs for core classes on the C++ side were also added for parity.
118 lines
3.6 KiB
Groovy
118 lines
3.6 KiB
Groovy
import edu.wpi.first.toolchain.*
|
|
|
|
plugins {
|
|
id "cpp"
|
|
id "com.diffplug.spotless" version "6.24.0"
|
|
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
|
|
id "edu.wpi.first.GradleRIO" version "2026.1.1-beta-1"
|
|
id 'org.photonvision.tools.WpilibTools' version '2.2.0-photon'
|
|
id 'com.google.protobuf' version '0.9.3' apply false
|
|
id 'edu.wpi.first.GradleJni' version '1.1.0'
|
|
id "org.ysb33r.doxygen" version "2.0.0" apply false
|
|
id 'com.gradleup.shadow' version '8.3.4' apply false
|
|
id "com.github.node-gradle.node" version "7.0.1" apply false
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
maven { url = "https://frcmaven.wpi.edu/artifactory/ex-mvn/" }
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven { url = "https://maven.photonvision.org/releases" }
|
|
maven { url = "https://maven.photonvision.org/snapshots" }
|
|
}
|
|
wpilibRepositories.addAllReleaseRepositories(it)
|
|
wpilibRepositories.addAllDevelopmentRepositories(it)
|
|
}
|
|
|
|
ext.localMavenURL = file("$project.buildDir/outputs/maven")
|
|
ext.allOutputsFolder = file("$project.buildDir/outputs")
|
|
|
|
// Configure the version number.
|
|
apply from: "versioningHelper.gradle"
|
|
|
|
ext {
|
|
wpilibVersion = "2026.1.1-beta-1"
|
|
wpimathVersion = wpilibVersion
|
|
openCVYear = "2025"
|
|
openCVversion = "4.10.0-3"
|
|
javalinVersion = "6.7.0"
|
|
libcameraDriverVersion = "dev-v2025.0.4-3-g95e2b38"
|
|
rknnVersion = "dev-v2025.0.0-7-g83c1bf3"
|
|
rubikVersion = "dev-v2025.1.0-7-g39588a8"
|
|
frcYear = "2026beta"
|
|
mrcalVersion = "dev-v2025.0.0-6-g475031a";
|
|
|
|
pubVersion = versionString
|
|
isDev = pubVersion.startsWith("dev")
|
|
|
|
wpilibNativeName = wpilibTools.platformMapper.currentPlatform.platformName;
|
|
jniPlatform = wpilibTools.platformMapper.wpilibClassifier;
|
|
|
|
println("Building for platform " + jniPlatform + " wpilib: " + wpilibNativeName)
|
|
println("Using Wpilib: " + wpilibVersion)
|
|
println("Using OpenCV: " + openCVversion)
|
|
|
|
|
|
photonMavenURL = 'https://maven.photonvision.org/' + (isDev ? 'snapshots' : 'releases');
|
|
println("Publishing Photonlib to " + photonMavenURL)
|
|
}
|
|
|
|
spotless {
|
|
java {
|
|
target fileTree('.') {
|
|
include '**/*.java'
|
|
exclude '**/build/**', '**/build-*/**', '**/src/generated/**'
|
|
}
|
|
toggleOffOn()
|
|
googleJavaFormat()
|
|
indentWithTabs(2)
|
|
indentWithSpaces(4)
|
|
removeUnusedImports()
|
|
trimTrailingWhitespace()
|
|
endWithNewline()
|
|
}
|
|
groovyGradle {
|
|
target fileTree('.') {
|
|
include '**/*.gradle'
|
|
exclude '**/build/**', '**/build-*/**'
|
|
}
|
|
greclipse()
|
|
indentWithSpaces(4)
|
|
trimTrailingWhitespace()
|
|
endWithNewline()
|
|
}
|
|
format 'misc', {
|
|
target fileTree('.') {
|
|
include '**/*.md', '**/.gitignore'
|
|
exclude '**/build/**', '**/build-*/**', '**/node_modules/**'
|
|
}
|
|
trimTrailingWhitespace()
|
|
indentWithSpaces(2)
|
|
endWithNewline()
|
|
}
|
|
}
|
|
|
|
wrapper {
|
|
gradleVersion = '8.14.3'
|
|
}
|
|
|
|
ext.getCurrentArch = {
|
|
return NativePlatforms.desktop
|
|
}
|
|
|
|
subprojects {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs.add '-XDstringConcat=inline'
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
// Enables UTF-8 support in Javadoc
|
|
tasks.withType(Javadoc) {
|
|
options.addStringOption("charset", "utf-8")
|
|
options.addStringOption("docencoding", "utf-8")
|
|
options.addStringOption("encoding", "utf-8")
|
|
options.addBooleanOption("Xdoclint/package:-org.photonvision.proto,-org.photonvision.struct,-org.photonvision.targeting.proto,-org.photonvision.jni", true)
|
|
}
|
|
}
|