From 52f58e5108c4e1014af9cb02cee4d12ac4ca1c3f Mon Sep 17 00:00:00 2001 From: Voomra Date: Tue, 26 Aug 2025 12:11:09 +0300 Subject: [PATCH] =?UTF-8?q?build:=20=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20maven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/build.gradle b/build.gradle index 04e389e..9cfeb34 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' id 'jacoco' + id 'maven-publish' } wrapper { @@ -47,3 +48,33 @@ jacocoTestReport { })) } } + +publishing { + publications { + mavenBinary(MavenPublication) { + groupId = project.group + artifactId = project.name + version = project.version + + from components.java + } + } + + repositories { + maven { + name = 'Di9' + url = uri('https://di9.ru/git/api/packages/Minecraft/maven') + def giteaToken = System.getenv("GITEA_TOKEN") + + credentials(HttpHeaderCredentials) { + name = 'Authorization' + value = "token ${giteaToken}" + } + + authentication { + header(HttpHeaderAuthentication) + } + } + } +} +