Skip to content

Commit

Permalink
Fix plugin development issues
Browse files Browse the repository at this point in the history
  • Loading branch information
freyacodes committed Oct 17, 2022
1 parent 47e5901 commit 07fffeb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ build/*
/plugin-api/out/
gradle.properties
application.yml
plugins
LavalinkServer/plugins
36 changes: 22 additions & 14 deletions plugin-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ plugins {

val archivesBaseName = "plugin-api"
group = "dev.arbjerg.lavalink"
version = "3.6.0"
version = "3.6.1"

dependencies {
compileOnly(libs.spring.boot)
compileOnly(libs.lavaplayer)
compileOnly(libs.json)
api(libs.spring.boot)
api(libs.lavaplayer)
api(libs.json)
}

java {
Expand All @@ -31,6 +31,8 @@ tasks.withType<Javadoc> {
}
}

val isGpgKeyDefined = findProperty("signing.gnupg.keyName") != null

publishing {
publications {
create<MavenPublication>("PluginApi") {
Expand Down Expand Up @@ -65,20 +67,26 @@ publishing {
}
}

repositories {
val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
val releases = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
if (isGpgKeyDefined) {
repositories {
val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
val releases = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"

maven(if ((version as String).endsWith("SNAPSHOT")) snapshots else releases) {
credentials {
password = findProperty("ossrhPassword") as? String
username = findProperty("ossrhUsername") as? String
maven(if ((version as String).endsWith("SNAPSHOT")) snapshots else releases) {
credentials {
password = findProperty("ossrhPassword") as? String
username = findProperty("ossrhUsername") as? String
}
}
}
} else {
println("Not capable of publishing to OSSRH because of missing GPG key")
}
}

signing {
sign(publishing.publications["PluginApi"])
useGpgCmd()
if (isGpgKeyDefined) {
signing {
sign(publishing.publications["PluginApi"])
useGpgCmd()
}
}

0 comments on commit 07fffeb

Please sign in to comment.