This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
forked from frc-88/SwerveLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (104 loc) · 3.66 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
buildscript {
if (rootProject == project) {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
url 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
jcenter()
}
dependencies {
classpath "edu.wpi.first:GradleRIO:2021.3.1"
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
}
}
}
plugins {
// Support for the java library
id 'java-library'
// Code formatter
id 'com.github.sherter.google-java-format' version '0.9'
// Maven publishing
id "maven-publish"
}
apply plugin: 'edu.wpi.first.GradleRIO'
if (rootProject == project) {
apply plugin: "io.github.gradle-nexus.publish-plugin"
}
compileJava.dependsOn 'googleJavaFormat'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
dependencies {
compile wpi.deps.wpilib()
compile wpi.deps.vendor.java()
// Tuples library
api "org.javatuples:javatuples:1.2"
// Apache Commons Math (for linear algebra)
api "org.apache.commons:commons-math3:3.6.1"
// TOML Config Parsing
api "com.electronwill.night-config:toml:3.6.3"
// Use JUnit Jupiter API for testing.
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
// Use JUnit Jupiter Engine for testing.
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
// Mockito for testing
testImplementation 'org.mockito:mockito-core:3.2.4'
}
test {
// Use junit platform for unit tests
useJUnitPlatform()
}
if (rootProject == project) {
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
archivesBaseName = 'SwerveLibrary'
artifactId = "swerve"
group = "io.github.frc-88"
version = "0.2.0"
from components.java
pom {
name = 'swerve'
description = 'Controls library for swerve drives, including differential swerves.'
url = 'https://github.com/frc-88/SwerveLibrary'
inceptionYear = '2021'
scm {
url = 'https://github.com/frc-88/SwerveLibrary'
connection = 'scm:https://github.com/frc-88/SwerveLibrary'
developerConnection = 'scm:git://github.com/frc-88/SwerveLibrary'
}
licenses {
license {
name = 'The MIT License'
url = 'https://github.com/frc-88/SwerveLibrary/blob/master/LICENSE.md'
distribution = 'repo'
}
}
developers {
developer {
id = 'paulterrasi'
name = 'Paul Terrasi'
email = '[email protected]'
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
packageGroup = "io.github.frc-88"
}
}