From d89fdf7acea4f1d2f60671c3a9e4f6a5e6b0b222 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sat, 3 May 2025 02:20:10 +0200 Subject: [PATCH] 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. --- build.gradle.kts | 22 +++++++++++++++++++++- settings.gradle.kts | 12 +++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index af2865a..4865a25 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") -} \ No newline at end of file +} + +publishing { + publications { + create("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 + } + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 48740a5..05b8c1b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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/")