mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
100 lines
2.3 KiB
Groovy
100 lines
2.3 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id 'com.github.johnrengelman.shadow' version '1.2.3'
|
|
}
|
|
apply plugin: 'net.ltgt.errorprone'
|
|
|
|
configurations.errorprone {
|
|
resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.0.9'
|
|
}
|
|
|
|
evaluationDependsOn(':wpilibj')
|
|
|
|
mainClassName = 'edu.wpi.first.wpilibj.test.AntJunitLanucher'
|
|
|
|
def wpilibj = project(':wpilibj')
|
|
|
|
dependencies {
|
|
compile wpilibj
|
|
compile files(wpilibj.sourceSets.test.output.classesDir)
|
|
compile ntcoreDep('java', 'arm')
|
|
compile cscoreDep('java', 'arm')
|
|
compile 'org.opencv:opencv-java:3.1.0'
|
|
compile 'junit:junit:4.11'
|
|
compile 'com.googlecode.junit-toolbox:junit-toolbox:2.0'
|
|
compile 'org.apache.ant:ant:1.9.4'
|
|
compile 'org.apache.ant:ant-junit:1.9.4'
|
|
}
|
|
|
|
build.dependsOn shadowJar
|
|
|
|
def nativeDirectory = "$buildDir/nativelibraries"
|
|
|
|
clean {
|
|
delete nativeDirectory
|
|
}
|
|
|
|
task copyIntegrationLibraries(type: Copy) {
|
|
description = 'Copies all native libraries to an easy to find folder'
|
|
group = 'WPILib'
|
|
destinationDir = file(nativeDirectory)
|
|
dependsOn shadowJar
|
|
dependsOn ':hal:build'
|
|
dependsOn ':wpilibj:build'
|
|
dependsOn ':wpilibc:build'
|
|
|
|
project(':wpilibj').model {
|
|
binaries {
|
|
withType(SharedLibraryBinarySpec) { spec ->
|
|
from(spec.sharedLibraryFile) {
|
|
into '/'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
project(':wpilibc').model {
|
|
binaries {
|
|
withType(SharedLibraryBinarySpec) { spec ->
|
|
from(spec.sharedLibraryFile) {
|
|
into '/'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
project(':hal').model {
|
|
binaries {
|
|
withType(SharedLibraryBinarySpec) { spec ->
|
|
from(spec.sharedLibraryFile) {
|
|
into '/'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
defineNetworkTablesProperties()
|
|
defineWpiUtilProperties()
|
|
defineCsCoreProperties()
|
|
|
|
from (file(netSharedLib)) {
|
|
into '/'
|
|
}
|
|
|
|
from (file(wpiUtilSharedLib)) {
|
|
into '/'
|
|
}
|
|
|
|
from (file(csLibArmLocation).path) {
|
|
include '**/*so.3.1'
|
|
include '**/libcscore.so'
|
|
include '**/libopencv_java310.so'
|
|
into '/'
|
|
}
|
|
}
|
|
|
|
compileJava.dependsOn tasks.getByPath(':wpilibj:testClasses')
|
|
|
|
build.dependsOn copyIntegrationLibraries
|