- Add gradle tasks to publish to nexus repository

This commit is contained in:
Taah 2022-02-21 17:03:51 -08:00
parent 93fa38d9da
commit ae61503df4

View File

@ -36,7 +36,7 @@ dependencies {
}
group = 'dev.plex'
version = '1.0 Beta 4'
version = '0.4-SNAPSHOT'
description = 'Plex'
shadowJar {
@ -79,3 +79,39 @@ tasks {
options.memberLevel = JavadocMemberLevel.PRIVATE
}
}
task snapshotPublish {
if (System.getenv("plex-repo-user") != null && System.getenv("plex-repo-pass") != null) {
System.out.println("Publishing")
publishing {
repositories {
maven {
url = "https://nexus.telesphoreo.me/repository/plex-snapshots/"
credentials {
username = System.getenv("plex-repo-user")
password = System.getenv("plex-repo-pass")
}
}
}
}
dependsOn(publish)
}
}
task releasePublish {
if (System.getenv("plex-repo-user") != null && System.getenv("plex-repo-pass") != null) {
System.out.println("Publishing")
publishing {
repositories {
maven {
url = "https://nexus.telesphoreo.me/repository/plex-releases/"
credentials {
username = System.getenv("plex-repo-user")
password = System.getenv("plex-repo-pass")
}
}
}
}
dependsOn(publish)
}
}