-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
53 lines (48 loc) · 1.52 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
52
53
plugins {
id "cpp"
id "visual-studio"
id "jaci.openrio.gradle.GradleRIO" version "2018.02.17"
}
def TEAM = 3512
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
target("roborio", jaci.openrio.gradle.frc.RoboRIO) {
team = TEAM
}
}
artifacts {
artifact('frcNative', jaci.openrio.gradle.frc.FRCNativeArtifact) {
targets << "roborio"
component = 'FRCUserProgram'
}
}
}
// Defining my C++ project. In this case, it is called 'FRCUserProgram',
// and is of the language C++.
model {
components {
FRCUserProgram(NativeExecutableSpec) {
// Target the RoboRIO (arm-frc-linux-gnueabihf)
targetPlatform 'roborio'
sources.cpp {
// This is where our source files are located (src/cpp for C++ files, src/include for headers)
source {
srcDirs = ['src/cpp']
include '**/*.cpp'
}
exportedHeaders{
srcDirs = ['src/cpp', 'src/include', 'src/include/WPILib']
include '**/*.hpp', '**/*.h'
}
// Define my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX) and NavX.
lib library: "wpilib"
lib library: "ctre"
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.5'
}