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 type: docker
steps: steps:
- name: build - name: test
image: eclipse-temurin:8-jdk image: eclipse-temurin:8-jdk
commands: commands:
- ./gradlew build - ./gradlew test
- name: publish - name: build
image: eclipse-temurin:8-jdk image: eclipse-temurin:8-jdk
environment: environment:
AUTH_TOKEN: # Gitea access token ENV variable 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) [![Build Status](https://drone.data.coop/api/badges/nellemann/libcvrapi/status.svg)](https://drone.data.coop/nellemann/libcvrapi)
## Usage ## 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 ```java
CvrApi api = new CvrApi("My user agent", "mySecretToken"); CvrApi api = new CvrApi("My user agent", "mySecretToken");

View file

@ -26,13 +26,18 @@ dependencies {
} }
publishing { publishing {
publications {
all(MavenPublication) {
from components.java
}
}
repositories { repositories {
maven { maven {
name = "gitea" 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 { credentials {
username = System.getenv("DRONE_REPO_OWNER") username = "$System.env.DRONE_REPO_OWNER"
password = System.getenv("AUTH_TOKEN") password = "$System.env.AUTH_TOKEN"
} }
} }
mavenLocal() mavenLocal()