- Fix nexus publish tasks

This commit is contained in:
Taah 2022-02-21 18:19:41 -08:00
parent 52111e5d8d
commit 15d28cccf2

View File

@ -63,6 +63,30 @@ publishing {
maven(MavenPublication) { maven(MavenPublication) {
from(components.java) from(components.java)
} }
plexReleases(MavenPublication) {
from(components.java)
repositories {
maven {
url("https://nexus.telesphoreo.me/repository/plex-releases/")
credentials {
username = System.getenv("plex_repo_user")
password = System.getenv("plex_repo_pass")
}
}
}
}
plexSnapshots(MavenPublication) {
from(components.java)
repositories {
maven {
url("https://nexus.telesphoreo.me/repository/plex-snapshots/")
credentials {
username = System.getenv("plex_repo_user")
password = System.getenv("plex_repo_pass")
}
}
}
}
} }
} }
@ -80,38 +104,10 @@ tasks {
} }
} }
task snapshotPublish { task publishRelease {
if (System.getenv("plex_repo_user") != null && System.getenv("plex_repo_pass") != null) { dependsOn(publishPlexReleasesPublicationToMavenRepository)
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 { task publishSnapshot {
if (System.getenv("plex_repo_user") != null && System.getenv("plex_repo_pass") != null) { dependsOn(publishPlexSnapshotsPublicationToMaven2Repository)
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)
}
} }