@@ -7,27 +7,31 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
7
7
import org.gradle.api.tasks.testing.logging.TestLogEvent
8
8
9
9
group = ' net.luckperms'
10
- version = ' 0.1-SNAPSHOT'
11
-
10
+ version = ' 0.2-SNAPSHOT'
12
11
13
12
java {
14
- // toolchain {
15
- // languageVersion = JavaLanguageVersion.of(11)
16
- // }
17
-
18
13
sourceCompatibility = ' 1.8'
19
14
targetCompatibility = ' 1.8'
20
15
21
16
withJavadocJar()
22
17
withSourcesJar()
23
18
}
24
19
20
+ javadoc {
21
+ options. encoding = ' UTF-8'
22
+ options. links(
23
+ ' https://docs.oracle.com/en/java/javase/21/docs/api/' ,
24
+ ' https://javadoc.io/static/com.squareup.retrofit2/retrofit/2.8.1/' ,
25
+ ' https://javadoc.io/static/com.squareup.okhttp3/okhttp/3.14.9/' ,
26
+ )
27
+ }
28
+
25
29
repositories {
26
30
mavenCentral()
27
31
}
28
32
29
33
test {
30
- // onlyIf { project.hasProperty('dockerTests') }
34
+ onlyIf { project. hasProperty(' dockerTests' ) }
31
35
useJUnitPlatform()
32
36
testLogging {
33
37
events = [TestLogEvent . PASSED , TestLogEvent . FAILED , TestLogEvent . SKIPPED ]
@@ -60,20 +64,66 @@ dependencies {
60
64
testImplementation ' com.google.guava:guava:32.1.3-jre'
61
65
}
62
66
63
- publishing {
64
- // repositories {
65
- // maven {
66
- // url = 'https://oss.sonatype.org/content/repositories/snapshots'
67
- // credentials {
68
- // username = sonatypeUsername
69
- // password = sonatypePassword
70
- // }
71
- // }
72
- // }
73
- publications {
74
- mavenJava(MavenPublication ) {
75
- from components. java
67
+ if (project. hasProperty(' sonatypeUsername' ) && project. hasProperty(' sonatypePassword' )) {
68
+ apply plugin : ' signing'
69
+
70
+ publishing {
71
+ repositories {
72
+ maven {
73
+ def releasesRepoUrl = ' https://oss.sonatype.org/service/local/staging/deploy/maven2/'
74
+ def snapshotsRepoUrl = ' https://oss.sonatype.org/content/repositories/snapshots/'
75
+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
76
+
77
+ credentials {
78
+ username sonatypeUsername
79
+ password sonatypePassword
80
+ }
81
+ }
82
+ }
83
+
84
+ publications {
85
+ mavenJava(MavenPublication ) {
86
+ from components. java
87
+
88
+ pom {
89
+ name = ' LuckPerms Rest API Java Client'
90
+ description = ' A Java client for the LuckPerms REST API.'
91
+ url = ' https://luckperms.net'
92
+
93
+ licenses {
94
+ license {
95
+ name = ' MIT'
96
+ url = ' https://opensource.org/licenses/MIT'
97
+ }
98
+ }
99
+
100
+ developers {
101
+ developer {
102
+ id = ' lucko'
103
+ name = ' Luck'
104
+ url = ' https://lucko.me'
105
+
106
+ }
107
+ }
108
+
109
+ scm {
110
+ connection = ' scm:git:https://github.com/LuckPerms/rest-api-java-client.git'
111
+ developerConnection
= ' scm:git:[email protected] :LuckPerms/rest-api-java-client.git'
112
+ url = ' https://github.com/LuckPerms/rest-api-java-client'
113
+ }
114
+
115
+ issueManagement {
116
+ system = ' GitHub'
117
+ url = ' https://github.com/LuckPerms/rest-api-java-client/issues'
118
+ }
119
+ }
120
+ }
76
121
}
77
122
}
78
- }
79
123
124
+ signing {
125
+ useGpgCmd()
126
+ sign publishing. publications. mavenJava
127
+ required = true
128
+ }
129
+ }
0 commit comments