diff --git a/build.gradle.kts b/build.gradle.kts index 94c2963..46bc1da 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("java") + id("maven-publish") } group = "net.thenextlvl.resolver" @@ -37,4 +38,18 @@ dependencies { tasks.test { useJUnitPlatform() +} + +publishing { + publications.create("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") + } + } } \ No newline at end of file