This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
86 lines (72 loc) · 1.67 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
85
86
plugins {
id 'cpp'
id 'java'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
id 'edu.wpi.first.NativeUtils' version '2020.7.2'
id 'edu.wpi.first.GradleJni' version '0.10.1'
id 'edu.wpi.first.GradleVsCode' version '0.12.0'
id 'google-test-test-suite'
}
allprojects {
repositories {
mavenCentral()
}
if (project.hasProperty('releaseMode')) {
wpilibRepositories.addAllReleaseRepositories(it)
} else {
wpilibRepositories.addAllDevelopmentRepositories(it)
}
}
sourceSets {
main {
java {
srcDirs = ['java/src/main/java']
}
resources {
srcDirs = ['java/src/main/resources']
}
}
}
apply from: 'config.gradle'
apply from: 'dependencies.gradle'
jar.archiveBaseName = "ADIS16470_IMU"
nativeUtils {
exportsConfigs {
adis16470imu {
}
}
}
model {
components {
adis16470imu(NativeLibrarySpec) {
sources {
cpp {
source {
srcDirs 'c++/src/main/cpp'
include '**/*.cpp'
}
exportedHeaders {
srcDirs 'c++/src/main/include'
}
}
}
nativeUtils.useRequiredLibrary(it, "wpilibc_shared", "ntcore_shared", "hal_shared", "wpiutil_shared")
}
}
testSuites {
adis16470imuTest(GoogleTestTestSuiteSpec) {
testing $.components.adis16470imu
sources.cpp {
source {
srcDir 'c++/src/test/cpp'
include '**/*.cpp'
}
}
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared", "googletest_static")
}
}
}
apply from: 'publish.gradle'
wrapper {
gradleVersion = '6.0.1'
}