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