forked from CrossTheRoadElec/Phoenix-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
84 lines (73 loc) · 2.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import org.gradle.internal.os.OperatingSystem
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import java.nio.file.StandardCopyOption
plugins {
id 'cpp'
id 'java'
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '2.1'
id 'edu.wpi.first.NativeUtils' version '2.0.1'
id 'edu.wpi.first.GradleVsCode' version '0.3.0'
}
// Ensure that the WPILibVersioningPlugin is setup by setting the release type, if releaseType wasn't
// already specified on the command line
if (!hasProperty('releaseType')) {
WPILibVersion {
releaseType = 'DEV'
}
}
apply from: "options.gradle"
apply from: 'config.gradle'
ext.sharedFrcConfigs = [CTRE_Phoenix: ['linux:athena']]
ext.sharedCCIConfigs = [CTRE_Phoenix: []]
ext.sharedConfigsJustWind = [CTRE_Phoenix : ['windows:x86-64', 'windows:x86']]
apply from: 'dependencies.gradle'
model {
exportsConfigs {
CTRE_Phoenix(ExportsConfig) {
x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
'_CT??_R0?AVbad_cast',
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
'_TI5?AVfailure']
x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
'_CT??_R0?AVbad_cast',
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
'_TI5?AVfailure']
}
}
components {
CTRE_Phoenix(NativeLibrarySpec) {
sources {
cpp {
source {
srcDirs 'src/main/native/cpp'
include '**/*.cpp'
}
exportedHeaders {
srcDirs 'src/main/native/include'
}
}
}
}
}
binaries {
//If we are not building for windows, don't bother with the shared library
withType(SharedLibraryBinarySpec) {
if(it.component.name == 'CTRE_Phoenix') {
if (it.targetPlatform.operatingSystem.name != 'windows') {
it.buildable = false
}
}
cppCompiler.define "POST_WPI_LLVM_MOVE"
}
withType(StaticLibraryBinarySpec) {
cppCompiler.define "POST_WPI_LLVM_MOVE"
}
}
}
apply from: 'publish.gradle'
publish.dependsOn check
wrapper {
gradleVersion = '4.9'
}