-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
140 lines (117 loc) · 4.09 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
version = '2024.0.0-beta-1'
repositories {
mavenCentral()
maven { url 'https://frcmaven.wpi.edu/artifactory/release/' }
maven { url 'https://maven.ctr-electronics.com/release/' }
maven { url 'https://maven.revrobotics.com/' }
maven { url 'https://dev.studica.com/maven/release/2024/' }
}
dependencies {
// Current GradleRIO versions at https://github.com/wpilibsuite/GradleRIO/blob/main/src/main/java/edu/wpi/first/gradlerio/wpi/WPIVersionsExtension.java
String wpilibVersion = '2024.1.1-beta-3'
String jacksonVersion = '2.12.4'
String ejmlVersion = '0.43.1'
String navxVersion = '2024.0.1-beta-3' // https://dev.studica.com/releases/2024/NavX.json
String phoenix5Version = '5.32.0-beta-1' // https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2024-beta-latest.json
String phoenix6Version = '24.0.0-beta-1' // https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2024-beta-latest.json
String revlibVersion = '2024.0.0' // https://software-metadata.revrobotics.com/REVLib-2024.json
compileOnly 'edu.wpi.first.wpilibj:wpilibj-java:' + wpilibVersion
compileOnly 'edu.wpi.first.ntcore:ntcore-java:' + wpilibVersion
compileOnly 'edu.wpi.first.hal:hal-java:' + wpilibVersion
compileOnly 'edu.wpi.first.wpinet:wpinet-java:' + wpilibVersion
compileOnly 'edu.wpi.first.wpiutil:wpiutil-java:' + wpilibVersion
compileOnly 'edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:' + wpilibVersion
compileOnly 'edu.wpi.first.wpimath:wpimath-java:' + wpilibVersion
compileOnly 'com.fasterxml.jackson.core:jackson-annotations:' + jacksonVersion
compileOnly 'org.ejml:ejml-ddense:' + ejmlVersion
compileOnly 'com.kauailabs.navx.frc:navx-frc-java:' + navxVersion
compileOnly 'com.ctre.phoenix:api-java:' + phoenix5Version
compileOnly 'com.ctre.phoenix:wpiapi-java:' + phoenix5Version
compileOnly 'com.ctre.phoenix6:wpiapi-java:' + phoenix6Version
compileOnly 'com.revrobotics.frc:REVLib-java:' + revlibVersion
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
}
test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
javadoc {
options.addBooleanOption('html5', true)
}
jar {
dependsOn javadoc
from sourceSets.main.allJava
from javadoc.destinationDir
archiveFileName = 'dtlib.jar'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
dependsOn javadoc
from javadoc.destinationDir
archiveClassifier = 'javadoc'
}
publishing {
publications {
mavenCentral(MavenPublication) {
groupId = 'org.victorrobotics.dtlib'
artifactId = 'dtlib-java'
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'DTLib'
description = 'An extension of WPILib developed by FRC Team 1559'
url = 'http://github.com/Team1559/DTLib'
inceptionYear = '2023'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/license/mit/'
}
}
organization {
name = 'Victor Robotics - FRC Team 1559'
url = 'https://victorrobotics.org'
}
developers {
developer {
name = 'Alexander Bhalla'
email = '[email protected]'
url = 'https://github.com/MathNerd28'
}
}
scm {
connection = 'scm:git:git://github.com/Team1559/DTLib.git'
developerConnection = 'scm:git:ssh://github.com:Team1559/DTLib.git'
url = 'https://github.com/Team1559/DTLib/tree/master'
}
}
}
}
repositories {
maven {
name = 'OSSRH'
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('DTLIB_PUBLISH_USERNAME')
password = System.getenv('DTLIB_PUBLISH_PASSWORD')
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenCentral
}