-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
129 lines (109 loc) · 4.04 KB
/
build.gradle
File metadata and controls
129 lines (109 loc) · 4.04 KB
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
plugins {
id 'java-library'
id 'maven-publish'
}
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
group = 'net.luckperms'
version = '0.2-SNAPSHOT'
java {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
withJavadocJar()
withSourcesJar()
}
javadoc {
options.encoding = 'UTF-8'
options.links(
'https://docs.oracle.com/en/java/javase/21/docs/api/',
'https://javadoc.io/static/com.squareup.retrofit2/retrofit/2.8.1/',
'https://javadoc.io/static/com.squareup.okhttp3/okhttp/3.14.9/',
)
}
repositories {
mavenCentral()
}
test {
onlyIf { project.hasProperty('dockerTests') }
useJUnitPlatform()
testLogging {
events = [TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED]
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}
dependencies {
api 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
implementation 'com.squareup.okio:okio:1.17.5'
implementation 'com.google.code.gson:gson:2.9.1'
implementation('com.launchdarkly:okhttp-eventsource:4.1.1') {
exclude(module: 'okhttp')
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.1'
testImplementation 'org.testcontainers:junit-jupiter:1.20.1'
testImplementation 'org.mockito:mockito-core:4.11.0'
testImplementation 'org.mockito:mockito-junit-jupiter:4.11.0'
testImplementation 'org.awaitility:awaitility:4.2.0'
testImplementation 'org.slf4j:slf4j-simple:1.7.36'
testImplementation 'com.google.guava:guava:32.1.3-jre'
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
apply plugin: 'signing'
publishing {
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'LuckPerms Rest API Java Client'
description = 'A Java client for the LuckPerms REST API.'
url = 'https://luckperms.net'
licenses {
license {
name = 'MIT'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'lucko'
name = 'Luck'
url = 'https://lucko.me'
email = 'git@lucko.me'
}
}
scm {
connection = 'scm:git:https://github.com/LuckPerms/rest-api-java-client.git'
developerConnection = 'scm:git:git@github.com:LuckPerms/rest-api-java-client.git'
url = 'https://github.com/LuckPerms/rest-api-java-client'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/LuckPerms/rest-api-java-client/issues'
}
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
required = true
}
}