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 { plugins {
id("java") id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.0" id("com.github.johnrengelman.shadow") version "7.1.0"
} }
@ -47,4 +48,23 @@ dependencies {
// Velocity // Velocity
compileOnly("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") // Velocity compileOnly("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") // Velocity
annotationProcessor("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") 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" rootProject.name = "shutdowninfo"
val nexusUser = providers.gradleProperty("alttdSnapshotUsername").get()
val nexusPass = providers.gradleProperty("alttdSnapshotPassword").get()
dependencyResolutionManagement { dependencyResolutionManagement {
repositories { repositories {
mavenCentral() mavenCentral()
// Altitude // Altitude
maven { maven {
name = "maven" name = "nexus"
url = uri("https://repo.destro.xyz/snapshots") url = uri("https://repo.alttd.com/repository/alttd-snapshot/")
credentials(PasswordCredentials::class) credentials {
username = nexusUser
password = nexusPass
}
} }
// Velocity // Velocity
maven("https://nexus.velocitypowered.com/repository/maven-public/") maven("https://nexus.velocitypowered.com/repository/maven-public/")