Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/workflows/publish.yml

This file was deleted.

30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,33 @@ Compiled targeting Java 25 bytecode — consumers need JDK 25+ at runtime.

## Installation

Published to GitHub Packages. Add the repository and dependency to your Gradle build:
Published via [JitPack](https://jitpack.io) — no credentials needed, same as `mavenCentral()`. JitPack builds the jar on demand straight from this repo's GitHub tags/releases.

**Kotlin DSL (`build.gradle.kts`):**

```kotlin
repositories {
maven {
url = uri("https://maven.pkg.github.com/codeyogico/micronaut-httpclient2curl")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN") // needs read:packages scope
}
}
maven { url = uri("https://jitpack.io") }
}

dependencies {
implementation("com.github.codeyogico:micronaut-httpclient2curl:<tag>")
}
```

**Groovy DSL (`build.gradle`):**

```groovy
repositories {
maven { url "https://jitpack.io" }
}

dependencies {
implementation("com.codeyogico:micronaut-httpclient2curl:<version>")
implementation "com.github.codeyogico:micronaut-httpclient2curl:<tag>"
}
```

GitHub Packages requires authentication even for public repositories, so consumers need a token with `read:packages` scope.
`<tag>` is any git tag/release (e.g. `v1.0.0`), a commit SHA, or `main-SNAPSHOT` for the latest commit on `main`. The first resolve after a new tag takes a little longer while JitPack builds it; after that it's cached.

## Configuration

Expand All @@ -57,4 +65,4 @@ curl-logger:

## Releasing

Publishing runs via the `Publish` GitHub Actions workflow (`.github/workflows/publish.yml`), triggered when a GitHub Release is published. The release tag (e.g. `v1.2.0`) is used as the published artifact version (`1.2.0`).
No publish step required — cut a GitHub Release (or just push a tag) and JitPack builds that version the first time someone requests it.
12 changes: 1 addition & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kotlin {
}

group = "com.codeyogico"
version = (findProperty("publishVersion") as String?) ?: "0.1.0-SNAPSHOT"
version = "0.1.0-SNAPSHOT"

repositories {
mavenLocal()
Expand Down Expand Up @@ -72,15 +72,5 @@ publishing {
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/codeyogico/micronaut-httpclient2curl")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

Loading