-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
51 lines (40 loc) · 1.2 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.nio.file.Files
import java.nio.file.StandardCopyOption
apply plugin: 'java'
apply plugin: 'eclipse'
repositories {
mavenCentral()
maven {
url = "http://first.wpi.edu/FRC/roborio/maven/release"
}
}
configurations{
compileOnly
}
sourceSets.main.compileClasspath += configurations.compileOnly
eclipse {
classpath {
plusConfigurations += [configurations.compileOnly]
}
}
dependencies {
compile project(':VisionProcessor2016')
compileOnly files(System.properties['user.home']+'/wpilib/tools/SmartDashboard.jar')
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
task install(dependsOn: jar) << {
File extensionDir
if (project.hasProperty('smartdashboard.extensions')) {
extensionDir = new File(project.smartdashboard.extensions)
} else {
extensionDir = new File(System.properties['user.home'], "SmartDashboard/extensions")
}
if (!extensionDir.exists()) {
extensionDir.createNewFile()
}
println "Installing extension to " + extensionDir
// Copy jar to extension directory
Files.copy(jar.archivePath.toPath(), extensionDir.toPath().resolve(jar.archivePath.getName()), StandardCopyOption.REPLACE_EXISTING)
}