-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
116 lines (97 loc) · 2.51 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
105
106
107
108
109
110
111
112
113
114
115
116
buildscript {
repositories {
jcenter()
}
}
plugins {
id "java"
id "checkstyle"
id "edu.wpi.first.GradleRIO" version "2020.1.2"
id "idea"
id "com.github.spotbugs" version "3.0.0"
id "maven-publish"
}
group 'frc.team4373'
version '2.1.0'
sourceCompatibility = 1.11
repositories {
mavenCentral()
}
checkstyle {
//noinspection GroovyAssignabilityCheck
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
toolVersion = '7.1.2'
}
spotbugs {
toolVersion = '3.1.11'
effort = 'max'
reportLevel = 'low'
sourceSets = []
}
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
task roospotbugs(type: GradleBuild) {
tasks = ['clean', 'build', 'spotbugsMain']
}
task gitsetup {
doLast {
Runtime.getRuntime().exec('git config core.hooksPath .githooks')
}
}
task version {
doLast {
println version
}
}
test {
useJUnitPlatform()
filter {
excludeTestsMatching "SwerveInputTransformConsistencyTest"
}
}
task consistencyTest(type: Test) {
useJUnitPlatform()
filter {
includeTestsMatching "SwerveInputTransformConsistencyTest"
}
}
publishing {
repositories {
maven {
name = "GitHubPackageRegistry"
url = uri("https://maven.pkg.github.com/Roobotics-FRC/RooSwerve")
credentials {
username = findProperty("USERNAME") ?: System.getenv("GITHUB_ACTOR")
password = findProperty("GITHUB_API_TOKEN") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
rooswerve(MavenPublication) {
groupId = group
artifactId = "rooswerve"
from components.java
}
}
}
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 4.
dependencies {
implementation wpi.deps.wpilib()
nativeZip wpi.deps.wpilibJni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.wpilibJni(wpi.platforms.desktop)
implementation wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
// In Java for now, the argument must be false
simulation wpi.deps.sim.gui(wpi.platforms.desktop, false)
}
wrapper {
gradleVersion = '5.0'
}