-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
117 lines (91 loc) · 2.53 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
117
buildscript {
ext.WPI_VER = "2024.1.1"
}
plugins {
id "java"
id "maven-publish"
id "edu.wpi.first.GradleRIO" version "${WPI_VER}"
id "com.diffplug.spotless" version "6.22.0"
id "com.github.spotbugs" version "5.2.0"
}
group = 'com.stuypulse'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
sourceSets {
main {
java {
srcDir "src"
}
}
}
configurations {
jaxDoclet
}
dependencies {
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
simulationDebug wpi.sim.enableDebug()
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop)
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()
implementation "edu.wpi.first.ntcore:ntcore-java:${WPI_VER}"
implementation "edu.wpi.first.wpiutil:wpiutil-java:${WPI_VER}"
runtimeOnly "edu.wpi.first.ntcore:ntcore-jni:${WPI_VER}:windowsx86"
runtimeOnly "edu.wpi.first.ntcore:ntcore-jni:${WPI_VER}:windowsx86-64"
runtimeOnly "edu.wpi.first.ntcore:ntcore-jni:${WPI_VER}:linuxx86-64"
runtimeOnly "edu.wpi.first.ntcore:ntcore-jni:${WPI_VER}:osxx86-64"
implementation group: 'org.knowm.xchart', name: 'xchart', version: '3.2.2'
testImplementation 'junit:junit:4.12'
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.stuypulse.stuylib'
artifactId = 'library'
version = "${version}"
from components.java
}
}
}
final YEAR = new Date().format('yyyy')
spotless {
java {
licenseHeader """
/* Copyright (c) ${YEAR} StuyPulse Robotics. All rights reserved. */
/* This work is licensed under the terms of the MIT license */
/* found in the root directory of this project. */
"""
googleJavaFormat('1.13.0').aosp()
trimTrailingWhitespace()
endWithNewline()
importOrder('com.stuypulse.stuylib', 'com.stuypulse', 'edu.wpi')
removeUnusedImports()
}
}
// Example to configure HTML report
spotbugsMain {
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugs {
ignoreFailures = true
effort = 'max'
}
javadoc {
destinationDir = file('docs/')
}
build {
dependsOn javadoc
}
jar {
from sourceSets.main.allSource
}