build: публикация
This commit is contained in:
16
README.MD
16
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")
|
||||
```
|
||||
|
||||
31
build.gradle
31
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user