mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
The wpimath library is a new library designed to separate the reusable math functionality from the common utility library (wpiutil) and the hardware-dependent library (wpilibc/j). Package names / include file names were NOT changed to minimize breakage. In a future year it would be good to revamp these for a more uniform user experience and to reduce the risk of accidental naming conflicts. While theoretically all of this functionality could be placed into wpiutil, several pieces of this library (e.g. DARE) are very time-consuming to compile, so it's nice to avoid this expense for users who only want cscore or ntcore. It also allows for easy future separation of build tasks vs number of workers on memory-constrained machines. This moves the following functionality from wpiutil into wpimath: - Eigen - ejml - Drake - DARE - wpiutil.math package (Matrix etc) - units And the following functionality from wpilibc/j into wpimath: - Geometry - Kinematics - Spline - Trajectory - LinearFilter - MedianFilter - Feed-forward controllers
177 lines
5.2 KiB
Groovy
177 lines
5.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id "org.ysb33r.doxygen" version "0.5"
|
|
}
|
|
|
|
evaluationDependsOn(':wpiutil')
|
|
evaluationDependsOn(':ntcore')
|
|
evaluationDependsOn(':cscore')
|
|
evaluationDependsOn(':hal')
|
|
evaluationDependsOn(':cameraserver')
|
|
evaluationDependsOn(':wpimath')
|
|
evaluationDependsOn(':wpilibc')
|
|
evaluationDependsOn(':wpilibj')
|
|
evaluationDependsOn(':wpilibOldCommands')
|
|
evaluationDependsOn(':wpilibNewCommands')
|
|
|
|
def baseArtifactIdCpp = 'documentation'
|
|
def artifactGroupIdCpp = 'edu.wpi.first.wpilibc'
|
|
def zipBaseNameCpp = '_GROUP_edu_wpi_first_wpilibc_ID_documentation_CLS'
|
|
|
|
def baseArtifactIdJava = 'documentation'
|
|
def artifactGroupIdJava = 'edu.wpi.first.wpilibj'
|
|
def zipBaseNameJava = '_GROUP_edu_wpi_first_wpilibj_ID_documentation_CLS'
|
|
|
|
def outputsFolder = file("$project.buildDir/outputs")
|
|
|
|
def cppProjectZips = []
|
|
|
|
cppProjectZips.add(project(':hal').cppHeadersZip)
|
|
cppProjectZips.add(project(':wpiutil').cppHeadersZip)
|
|
cppProjectZips.add(project(':ntcore').cppHeadersZip)
|
|
cppProjectZips.add(project(':cscore').cppHeadersZip)
|
|
cppProjectZips.add(project(':cameraserver').cppHeadersZip)
|
|
cppProjectZips.add(project(':wpimath').cppHeadersZip)
|
|
cppProjectZips.add(project(':wpilibc').cppHeadersZip)
|
|
cppProjectZips.add(project(':wpilibOldCommands').cppHeadersZip)
|
|
cppProjectZips.add(project(':wpilibNewCommands').cppHeadersZip)
|
|
|
|
doxygen {
|
|
executables {
|
|
doxygen version : '1.8.18',
|
|
baseURI : 'https://frcmaven.wpi.edu/artifactory/generic-release-mirror/doxygen'
|
|
}
|
|
}
|
|
|
|
doxygen {
|
|
generate_html true
|
|
|
|
cppProjectZips.each {
|
|
dependsOn it
|
|
source it.source
|
|
}
|
|
|
|
exclude 'Eigen/**'
|
|
exclude 'unsupported/**'
|
|
exclude 'units/**'
|
|
exclude 'uv.h'
|
|
exclude 'uv/**'
|
|
|
|
|
|
extension_mapping 'inc=C++'
|
|
project_name 'WPILibC++'
|
|
project_number wpilibVersioning.version.get()
|
|
javadoc_autobrief true
|
|
recursive true
|
|
quiet true
|
|
warnings false
|
|
warn_if_doc_error false
|
|
warn_no_paramdoc false
|
|
warn_format false
|
|
warn_logfile false
|
|
warn_if_undocumented false
|
|
generate_latex false
|
|
use_mathjax true
|
|
html_timestamp true
|
|
generate_treeview true
|
|
extract_static true
|
|
}
|
|
|
|
tasks.register("zipCppDocs", Zip) {
|
|
archiveBaseName = zipBaseNameCpp
|
|
destinationDirectory = outputsFolder
|
|
dependsOn doxygen
|
|
from ("$buildDir/docs/doxygen/html")
|
|
into '/'
|
|
}
|
|
|
|
// Java
|
|
configurations {
|
|
javaSource {
|
|
transitive false
|
|
}
|
|
}
|
|
|
|
ext {
|
|
sharedCvConfigs = [:]
|
|
staticCvConfigs = [:]
|
|
useJava = true
|
|
useCpp = false
|
|
skipDev = true
|
|
useDocumentation = true
|
|
}
|
|
|
|
apply from: "${rootDir}/shared/opencv.gradle"
|
|
|
|
task generateJavaDocs(type: Javadoc) {
|
|
classpath += project(":wpimath").sourceSets.main.compileClasspath
|
|
options.links("https://docs.oracle.com/en/java/javase/11/docs/api/")
|
|
options.addStringOption "tag", "pre:a:Pre-Condition"
|
|
options.addBooleanOption "Xdoclint:html,missing,reference,syntax", true
|
|
options.addBooleanOption('html5', true)
|
|
dependsOn project(':wpilibj').generateJavaVersion
|
|
dependsOn project(':hal').generateUsageReporting
|
|
dependsOn project(':wpimath').generateNat
|
|
source project(':hal').sourceSets.main.java
|
|
source project(':wpiutil').sourceSets.main.java
|
|
source project(':cscore').sourceSets.main.java
|
|
source project(':ntcore').sourceSets.main.java
|
|
source project(':wpimath').sourceSets.main.java
|
|
source project(':wpilibj').sourceSets.main.java
|
|
source project(':cameraserver').sourceSets.main.java
|
|
source project(':wpilibOldCommands').sourceSets.main.java
|
|
source project(':wpilibNewCommands').sourceSets.main.java
|
|
source configurations.javaSource.collect { zipTree(it) }
|
|
include '**/*.java'
|
|
failOnError = true
|
|
options.encoding = 'UTF-8'
|
|
|
|
title = "WPILib API ${wpilibVersioning.version.get()}"
|
|
ext.entryPoint = "$destinationDir/index.html"
|
|
|
|
if (JavaVersion.current().isJava11Compatible()) {
|
|
options.addBooleanOption('-no-module-directories', true)
|
|
doLast {
|
|
// This is a work-around for https://bugs.openjdk.java.net/browse/JDK-8211194. Can be removed once that issue is fixed on JDK's side
|
|
// Since JDK 11, package-list is missing from javadoc output files and superseded by element-list file, but a lot of external tools still need it
|
|
// Here we generate this file manually
|
|
new File(destinationDir, 'package-list').text = new File(destinationDir, 'element-list').text
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register("zipJavaDocs", Zip) {
|
|
archiveBaseName = zipBaseNameJava
|
|
destinationDirectory = outputsFolder
|
|
dependsOn generateJavaDocs
|
|
from ("$buildDir/docs/javadoc")
|
|
into '/'
|
|
}
|
|
|
|
addTaskToCopyAllOutputs(zipCppDocs)
|
|
addTaskToCopyAllOutputs(zipJavaDocs)
|
|
|
|
build.dependsOn zipCppDocs
|
|
build.dependsOn zipJavaDocs
|
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
publishing {
|
|
publications {
|
|
java(MavenPublication) {
|
|
artifact zipJavaDocs
|
|
|
|
artifactId = "${baseArtifactIdJava}"
|
|
groupId artifactGroupIdJava
|
|
version wpilibVersioning.version.get()
|
|
}
|
|
cpp(MavenPublication) {
|
|
artifact zipCppDocs
|
|
|
|
artifactId = "${baseArtifactIdCpp}"
|
|
groupId artifactGroupIdCpp
|
|
version wpilibVersioning.version.get()
|
|
}
|
|
}
|
|
}
|