Skip to content

Commit

Permalink
Merge pull request #34 from TheNextLvl-net/publishing
Browse files Browse the repository at this point in the history
Add Maven publishing configuration to build script
  • Loading branch information
NonSwag authored Dec 24, 2024
2 parents 8d6b258 + 183f9a5 commit be80394
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id("java")
id("maven-publish")
}

group = rootProject.group
Expand Down Expand Up @@ -27,3 +28,17 @@ dependencies {

annotationProcessor("org.projectlombok:lombok:1.18.36")
}

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
repositories.maven {
val channel = if ((version as String).contains("-pre")) "snapshots" else "releases"
url = uri("https://repo.thenextlvl.net/$channel")
credentials {
username = System.getenv("REPOSITORY_USER")
password = System.getenv("REPOSITORY_TOKEN")
}
}
}

0 comments on commit be80394

Please sign in to comment.