From e5f375155ae99fb75ef1704118b5718f4d5a69da Mon Sep 17 00:00:00 2001 From: Voomra Date: Fri, 26 Apr 2024 01:53:47 +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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 16 +++++----------- build.gradle | 31 +++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/README.MD b/README.MD index fed0a46..d726fb1 100644 --- a/README.MD +++ b/README.MD @@ -5,17 +5,11 @@ ### Gradle ```groovy -implementation("ru.di9:xml-element:1.0") +repositories { + maven { url "https://di9.ru/git/api/packages/Voomra/maven" } +} ``` -## Сборка - -```shell -gradle build -``` - -## Установка в локальный Maven - -```shell -gradle publishToMavenLocal +```groovy +implementation("ru.di9:xml-element:1.2.1") ``` diff --git a/build.gradle b/build.gradle index c86d393..c74dd2f 100644 --- a/build.gradle +++ b/build.gradle @@ -35,12 +35,31 @@ test { useJUnitPlatform() } -publishing.publications { - mavenBinary(MavenPublication) { - groupId = project.group - artifactId = project.name - version = project.version +publishing { + publications { + mavenBinary(MavenPublication) { + groupId = project.group + artifactId = project.name + version = project.version - from components.java + from components.java + } + } + + repositories { + maven { + name = "Di9" + url = uri("https://di9.ru/git/api/packages/Voomra/maven") + def giteaToken = System.getenv("GITEA_TOKEN") + + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "token ${giteaToken}" + } + + authentication { + header(HttpHeaderAuthentication) + } + } } }