-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (107 loc) · 3.61 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
plugins {
id 'java'
id 'java-library'
id 'jacoco'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'signing'
id("io.github.gradle-nexus.publish-plugin").version("1.0.0")
}
java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
test {
useJUnitPlatform()
}
javadoc {
destinationDir = new File(rootProject.projectDir, "docs/javadoc/.")
}
repositories {
jcenter()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
testImplementation 'org.mockito:mockito-core:3.8.0'
implementation files("libs/RobotCore.jar")
implementation 'org.jetbrains:annotations:20.1.0'
//implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.3'
//implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.3'
}
String versionstr
String releasever
if (System.getenv('VERSION')) {
versionstr = System.getenv('VERSION')
releasever = versionstr.substring(versionstr.indexOf('v') + 1)
} else {
releasever = ''
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
groupId = "com.ftc11392.sequoia"
artifactId = "sequoia"
version = releasever
packaging = "jar"
from components.java
name = "Sequoia"
description = "A First Tech Challenge library for subsystem management and command-" +
"based programming built on top of the FTC SDK."
url = "https://github.com/HighOakRobotics/Sequoia"
licenses {
license {
name = "BSD-3"
url = "https://opensource.org/licenses/BSD-3-Clause"
}
}
developers {
developer {
name = "Raymond Zhao"
email = "[email protected]"
organization = "High Oak Robotics"
organizationUrl = "https://github.com/HighOakRobotics"
}
developer {
name = "Brian Lu"
email = "[email protected]"
organization = "High Oak Robotics"
organizationUrl = "https://github.com/HighOakRobotics"
}
}
scm {
connection = 'scm:git:[email protected]:HighOakRobotics/Sequoia.git'
developerConnection = 'scm:git:[email protected]:HighOakRobotics/Sequoia.git'
url = 'https://github.com/HighOakRobotics/Sequoia'
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
stagingProfileId = "90636597e2d0f"
}
}
}
signing {
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
//html.destination file("${buildDir}/jacocoHtml")
}
}