Update Maven repository URL and add publishing configuration

Replaced old Maven repository URL with updated Altitude Nexus URL and secured credentials usage. Added a Maven publishing configuration to enable artifact publishing to the Altitude snapshot repository.
This commit is contained in:
Teriuihi 2025-05-03 02:20:10 +02:00
parent f16166033a
commit d89fdf7ace
2 changed files with 30 additions and 4 deletions

View File

@ -2,6 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocatio
plugins {
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.0"
}
@ -47,4 +48,23 @@ dependencies {
// Velocity
compileOnly("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") // Velocity
annotationProcessor("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT")
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories{
maven {
name = "nexus"
url = uri("https://repo.alttd.com/repository/alttd-snapshot/")
credentials {
username = project.property("alttdSnapshotUsername") as String
password = project.property("alttdSnapshotPassword") as String
}
}
}
}

View File

@ -1,13 +1,19 @@
rootProject.name = "shutdowninfo"
val nexusUser = providers.gradleProperty("alttdSnapshotUsername").get()
val nexusPass = providers.gradleProperty("alttdSnapshotPassword").get()
dependencyResolutionManagement {
repositories {
mavenCentral()
// Altitude
maven {
name = "maven"
url = uri("https://repo.destro.xyz/snapshots")
credentials(PasswordCredentials::class)
name = "nexus"
url = uri("https://repo.alttd.com/repository/alttd-snapshot/")
credentials {
username = nexusUser
password = nexusPass
}
}
// Velocity
maven("https://nexus.velocitypowered.com/repository/maven-public/")