Skip to content

Commit 3ead3be

Browse files
committed
Fix plugin development issues
1 parent db242da commit 3ead3be

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ build/*
1717
/plugin-api/out/
1818
gradle.properties
1919
application.yml
20-
plugins
20+
LavalinkServer/plugins

plugin-api/build.gradle.kts

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ plugins {
77

88
val archivesBaseName = "plugin-api"
99
group = "dev.arbjerg.lavalink"
10-
version = "3.6.0"
10+
version = "3.6.1"
1111

1212
dependencies {
13-
compileOnly(libs.spring.boot)
14-
compileOnly(libs.lavaplayer)
15-
compileOnly(libs.json)
13+
api(libs.spring.boot)
14+
api(libs.lavaplayer)
15+
api(libs.json)
1616
}
1717

1818
java {
@@ -31,6 +31,8 @@ tasks.withType<Javadoc> {
3131
}
3232
}
3333

34+
val isGpgKeyDefined = findProperty("signing.gnupg.keyName") != null
35+
3436
publishing {
3537
publications {
3638
create<MavenPublication>("PluginApi") {
@@ -65,20 +67,26 @@ publishing {
6567
}
6668
}
6769

68-
repositories {
69-
val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
70-
val releases = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
70+
if (isGpgKeyDefined) {
71+
repositories {
72+
val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
73+
val releases = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
7174

72-
maven(if ((version as String).endsWith("SNAPSHOT")) snapshots else releases) {
73-
credentials {
74-
password = findProperty("ossrhPassword") as? String
75-
username = findProperty("ossrhUsername") as? String
75+
maven(if ((version as String).endsWith("SNAPSHOT")) snapshots else releases) {
76+
credentials {
77+
password = findProperty("ossrhPassword") as? String
78+
username = findProperty("ossrhUsername") as? String
79+
}
7680
}
7781
}
82+
} else {
83+
println("Not capable of publishing to OSSRH because of missing GPG key")
7884
}
7985
}
8086

81-
signing {
82-
sign(publishing.publications["PluginApi"])
83-
useGpgCmd()
87+
if (isGpgKeyDefined) {
88+
signing {
89+
sign(publishing.publications["PluginApi"])
90+
useGpgCmd()
91+
}
8492
}

0 commit comments

Comments
 (0)