apply plugin: 'java' apply plugin: 'application' apply plugin: 'com.github.johnrengelman.shadow' evaluationDependsOn(':wpilibj') mainClassName = 'edu.wpi.first.wpilibj.RobotBase' buildscript { repositories { jcenter() } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' } } 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:+' } def nativeDirectory = "$buildDir/output" clean { delete nativeDirectory } task copyRobotLibraries(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' from (shadowJar) { into '/' } project(':wpilibj').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 '/' } } build.dependsOn copyRobotLibraries jar { manifest { attributes 'Robot-Class': 'MyRobot' } } jar.dependsOn ':wpilibj:build'