Fix maven publish.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Mark Nellemann 2023-01-03 14:35:44 +01:00
parent f12de26a20
commit b6fdd7a5f6
3 changed files with 15 additions and 7 deletions

View file

@ -4,11 +4,11 @@ name: default
type: docker
steps:
- name: build
- name: test
image: eclipse-temurin:8-jdk
commands:
- ./gradlew build
- name: publish
- ./gradlew test
- name: build
image: eclipse-temurin:8-jdk
environment:
AUTH_TOKEN: # Gitea access token ENV variable

View file

@ -7,6 +7,9 @@ A Java library to query <https://www.cvrapi.dk> (a Danish VAT API service).
[![Build Status](https://drone.data.coop/api/badges/nellemann/libcvrapi/status.svg)](https://drone.data.coop/nellemann/libcvrapi)
## Usage
Include the [libcvrapi dependency](https://git.data.coop/nellemann/-/packages/maven/biz.nellemann.libs-libcvrapi/) into your Java project.
Lookup company by CVR number:
```java
CvrApi api = new CvrApi("My user agent", "mySecretToken");

View file

@ -26,13 +26,18 @@ dependencies {
}
publishing {
repositories {
publications {
all(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = "gitea"
url = uri("https://git.data.coop/api/packages/${System.getenv("DRONE_REPO_OWNER")}/maven")
url = uri("https://git.data.coop/api/packages/$System.env.DRONE_REPO_OWNER/maven")
credentials {
username = System.getenv("DRONE_REPO_OWNER")
password = System.getenv("AUTH_TOKEN")
username = "$System.env.DRONE_REPO_OWNER"
password = "$System.env.AUTH_TOKEN"
}
}
mavenLocal()