Skip to content

Commit

Permalink
Add Maven publishing configuration to build script
Browse files Browse the repository at this point in the history
  • Loading branch information
NonSwag committed Jul 26, 2024
1 parent 0466630 commit 459b08a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions version-checker/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("java")
id("java-library")
id("maven-publish")
}

group = "net.thenextlvl.core"
Expand All @@ -26,4 +27,18 @@ dependencies {

tasks.test {
useJUnitPlatform()
}

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 459b08a

Please sign in to comment.