Fix maven publish.
This commit is contained in:
parent
f12de26a20
commit
b6fdd7a5f6
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
13
build.gradle
13
build.gradle
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue