-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
110 lines (87 loc) · 3.14 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
plugins {
id 'me.qoomon.git-versioning' version '6.3.8'
id 'java'
id 'java-library'
id 'checkstyle'
id 'maven-publish'
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
def WPILIB_VER = '2024.3.2'
def NTCORE_VER = WPILIB_VER
def WPIUTIL_VER = WPILIB_VER
def OPENCV_VER = '4.8.0-2'
def PHOENIX_VER = '5.33.1'
def REV_VERSION = '2024.2.3'
def JUNIT_VER = '5.9.2'
def ARCH = 'linuxx86-64'
dependencies {
// We may or may not need to add the new HAL library which was split off
// from wpilib. Ideally we don't have to touch it at all.
implementation "edu.wpi.first.wpilibj:wpilibj-java:$WPILIB_VER"
implementation "edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:$WPILIB_VER"
implementation "edu.wpi.first.ntcore:ntcore-java:$NTCORE_VER"
implementation "edu.wpi.first.wpiutil:wpiutil-java:$WPIUTIL_VER"
implementation "edu.wpi.first.wpimath:wpimath-java:$WPIUTIL_VER"
implementation "edu.wpi.first.wpiunits:wpiunits-java:$WPIUTIL_VER"
implementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:$OPENCV_VER"
implementation "com.revrobotics.frc:REVLib-java:$REV_VERSION"
implementation "com.ctre.phoenix:wpiapi-java:$PHOENIX_VER"
implementation "com.ctre.phoenix:api-java:$PHOENIX_VER"
// Do not require these as runtime dependencies, since WPILib doesn't.
// The user can figure out what version they need (RIO vs. desktop).
testRuntimeOnly "edu.wpi.first.ntcore:ntcore-jni:$NTCORE_VER:$ARCH"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$JUNIT_VER"
testImplementation "org.junit.jupiter:junit-jupiter-api:$JUNIT_VER"
testImplementation "org.junit.jupiter:junit-jupiter-params:$JUNIT_VER"
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'com.google.guava:guava:31.1-jre'
}
apply from: 'repositories.gradle'
allprojects {
repositories {
repositories.add(rootProject.repositories.getByName('frcHome'))
mavenLocal()
mavenCentral()
repositories.add(rootProject.repositories.getByName('frc-wpi'))
repositories.add(rootProject.repositories.getByName('phoenix-ctr'))
repositories.add(rootProject.repositories.getByName('revrobotics'))
}
}
compileJava {
options.deprecation = true
}
test {
testLogging {
events "failed"
exceptionFormat "full"
}
}
javadoc {
options.addBooleanOption('html5', true)
}
wrapper {
gradleVersion = '7.6'
}
gitVersioning.apply {
// see configuration documentation below
refs {
branch('master'){
describeTagPattern = 'v?(?<release>[0-9]{4}(?:\\.[0-9]+){0,2})(?<prerelease>(?:\\-?[a-zA-Z_]+)?\\-?(?:[0-9]+)?)'
version = '${describe.tag.release}${describe.tag.prerelease}'
}
branch('.*'){
version = 'dev-${ref.slug}-${commit.short}'
}
}
}
// By default, checkstyle wants to look at tests
// we override to only look at the main code
checkstyle {
toolVersion = '9.3'
configFile file("config/checkstyle/checkstyle.xml")
sourceSets = [project.sourceSets.main]
}
apply from: 'publish.gradle'