mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
* Revert "Force OpenCV to 3.1.0 (#602)"
This reverts commit 50ed55e8e2.
* Removes Simulation
* Removes old build system
* Removes old gtest
* Adds new gmock and gtest
* Updates to new ni-libraries
* removes MyRobot (to be replaced)
* moves files to new location
* Adds new sim backend and new test executables
* updates .styleguide and .gitignore
* Changes cpp WPILibVersion to a function
MSVC throws an AV with the old version.
* Disables USBCamera on all systems except for linux
* 2018 NI Libraries
* New build system
157 lines
4.1 KiB
Groovy
157 lines
4.1 KiB
Groovy
apply plugin: 'maven-publish'
|
|
apply plugin: 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin'
|
|
|
|
if (!hasProperty('releaseType')) {
|
|
WPILibVersion {
|
|
releaseType = 'dev'
|
|
}
|
|
}
|
|
|
|
def pubVersion
|
|
if (project.hasProperty("publishVersion")) {
|
|
pubVersion = project.publishVersion
|
|
} else {
|
|
pubVersion = WPILibVersion.version
|
|
}
|
|
|
|
def baseArtifactId = 'wpilibj'
|
|
def artifactGroupId = 'edu.wpi.first.wpilibj'
|
|
|
|
task cppSourcesZip(type: Zip) {
|
|
destinationDir = project.buildDir
|
|
classifier = "sources"
|
|
|
|
from(licenseFile) {
|
|
into '/'
|
|
}
|
|
|
|
from('src/main/native/cpp') {
|
|
into '/'
|
|
}
|
|
|
|
model {
|
|
tasks {
|
|
it.each {
|
|
if (it in getJNIHeadersClass()) {
|
|
from (it.outputs.files) {
|
|
into '/'
|
|
}
|
|
dependsOn it
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task javadoc(type: Javadoc, overwrite: true) {
|
|
javadoc.options.links("http://docs.oracle.com/javase/8/docs/api/")
|
|
options.addStringOption "tag", "pre:a:Pre-Condition"
|
|
// options.addStringOption('Xdoclint:accessibility,syntax,reference,html', '-quiet')
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
archives cppSourcesZip
|
|
}
|
|
|
|
model {
|
|
publishing {
|
|
def wpilibJNIStaticTaskList = createComponentZipTasks($.components, 'wpilibJNIStatic', 'jni', Jar, project, { task, value ->
|
|
value.each { binary->
|
|
if (binary.buildable) {
|
|
if (binary instanceof SharedLibraryBinarySpec) {
|
|
task.dependsOn binary.buildTask
|
|
task.from (binary.sharedLibraryFile) {
|
|
into getPlatformPath(binary)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
def wpilibJNISharedTaskList = createComponentZipTasks($.components, 'wpilibJNIShared', 'jni', Jar, project, { task, value ->
|
|
value.each { binary->
|
|
if (binary.buildable) {
|
|
if (binary instanceof SharedLibraryBinarySpec) {
|
|
task.dependsOn binary.buildTask
|
|
task.from (binary.sharedLibraryFile) {
|
|
into getPlatformPath(binary)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
def allSharedTask
|
|
if (!project.hasProperty('jenkinsBuild')) {
|
|
allSharedTask = createAllCombined(wpilibJNISharedTaskList, 'wpilibJNIShared', 'jni', Jar, project)
|
|
}
|
|
|
|
def allStaticTask
|
|
if (!project.hasProperty('jenkinsBuild')) {
|
|
allStaticTask = createAllCombined(wpilibJNIStaticTaskList, 'wpilibJNIStatic', 'jni', Jar, project)
|
|
}
|
|
|
|
publications {
|
|
jniShared(MavenPublication) {
|
|
wpilibJNISharedTaskList.each {
|
|
artifact it
|
|
}
|
|
|
|
if (!project.hasProperty('jenkinsBuild')) {
|
|
artifact allSharedTask
|
|
}
|
|
|
|
artifact cppSourcesZip
|
|
|
|
artifactId = "${baseArtifactId}-jniShared"
|
|
groupId artifactGroupId
|
|
version pubVersion
|
|
}
|
|
|
|
jni(MavenPublication) {
|
|
wpilibJNIStaticTaskList.each {
|
|
artifact it
|
|
}
|
|
|
|
if (!project.hasProperty('jenkinsBuild')) {
|
|
artifact allStaticTask
|
|
}
|
|
|
|
artifact cppSourcesZip
|
|
|
|
artifactId = "${baseArtifactId}-jni"
|
|
groupId artifactGroupId
|
|
version pubVersion
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
publishing {
|
|
publications {
|
|
|
|
java(MavenPublication) {
|
|
artifact jar
|
|
artifact sourcesJar
|
|
artifact javadocJar
|
|
|
|
artifactId = "${baseArtifactId}-java"
|
|
groupId artifactGroupId
|
|
version pubVersion
|
|
}
|
|
}
|
|
}
|