Files
allwpilib/wpilibjIntegrationTests/build.gradle

72 lines
1.6 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 'edu.wpi.first.wpilib.networktables.java:NetworkTables:+:arm'
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'
dependsOn shadowJar
dependsOn ':hal:build'
dependsOn ':wpilibj:build'
project(':wpilibj').model {
binaries {
withType(SharedLibraryBinarySpec) { spec ->
from(spec.sharedLibraryFile)
}
}
}
project(':hal').model {
binaries {
withType(SharedLibraryBinarySpec) { spec ->
from(spec.sharedLibraryFile)
}
}
}
defineNetworkTablesProperties()
defineWpiUtilProperties()
from file(netSharedLib)
from file(wpiUtilSharedLib)
into nativeDirectory
}
compileJava.dependsOn tasks.getByPath(':wpilibj:testClasses')
build.dependsOn copyIntegrationLibraries