From 73843edb8c8d729a246bcf0170aa1d647749e847 Mon Sep 17 00:00:00 2001 From: MelanX Date: Tue, 14 May 2024 12:19:40 +0200 Subject: [PATCH] add remote maven with credentials --- build.h | 2 +- scripts/mod.gradle | 2 +- scripts/mod/publish.gradle | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build.h b/build.h index 94ae06b..381269d 100644 --- a/build.h +++ b/build.h @@ -1,3 +1,3 @@ -#define LOCAL_MAVEN 'https://maven.moddingx.org/' +#define LOCAL_MAVEN 'https://maven.moddingx.org/release' #define MIN_JAVA_VERSION 17 #define GRADLE_VERSION [8.1.1,9.0) diff --git a/scripts/mod.gradle b/scripts/mod.gradle index 9ac326d..7a2fed8 100644 --- a/scripts/mod.gradle +++ b/scripts/mod.gradle @@ -31,7 +31,7 @@ if (mod.mixin) { #include "mod/mixin.gradle" } -if ('local_maven' in mod) { +if ('local_maven' in mod || 'remote_maven' in mod) { #include "mod/publish.gradle" } diff --git a/scripts/mod/publish.gradle b/scripts/mod/publish.gradle index c329260..fd2db2f 100644 --- a/scripts/mod/publish.gradle +++ b/scripts/mod/publish.gradle @@ -24,7 +24,12 @@ publishing { } repositories { maven { - url mod.local_maven + if ('remote_maven' in mod) { + url mod.maven + credentials(PasswordCredentials) + } else if ('local_maven' in mod) { + url mod.local_maven + } } } }