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
22 changes: 3 additions & 19 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Publish to Maven Central

on:
release:
types:
- published
workflow_dispatch:

jobs:
publish:
if: ${{ github.ref_name == 'main' }}
runs-on: ubuntu-latest
env:
GROUP_ID: dev.datastar.kotlin
ARTIFACT_ID: kotlin-sdk


steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand All @@ -20,29 +16,17 @@ jobs:
java-version: 21
- uses: gradle/actions/setup-gradle@v4

- name: Set version from release
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Package
run: >
./gradlew clean build -x check
-PgroupId=${{ env.GROUP_ID }}
-PartifactId=${{ env.ARTIFACT_ID }}
-Pversion=${{ env.VERSION }}

- name: Stage Artifacts
run: >
./gradlew publish --no-configuration-cache
-PgroupId=${{ env.GROUP_ID }}
-PartifactId=${{ env.ARTIFACT_ID }}
-Pversion=${{ env.VERSION }}

- name: Publish to Maven Central
run: >
./gradlew jreleaserDeploy --no-configuration-cache
-PgroupId=${{ env.GROUP_ID }}
-PartifactId=${{ env.ARTIFACT_ID }}
-Pversion=${{ env.VERSION }}

env:
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The minimum JVM version compatible is **Java 21**.

```kotlin
dependencies {
implementation("dev.datastar.kotlin:kotlin-sdk:...")
implementation("dev.datastar.kotlin:kotlin-sdk:1.0.0-RC1")
}
```

Expand All @@ -30,7 +30,7 @@ dependencies {
<dependency>
<groupId>dev.datastar.kotlin</groupId>
<artifactId>kotlin-sdk</artifactId>
<version>...</version>
<version>1.0.0-RC1</version>
</dependency>
```

Expand All @@ -42,9 +42,9 @@ The following shows a simple implementation base of the Java `HttpServer`.

```kotlin
// Depending on your context, you'll need to adapt the `Request` and `Response` interfaces, as well as implementation of the `JsonUnmarshaller` type.
val jsonUnmarshaller: JsonUnmarshaller<YourType> = ...
val request: Request = ...
val response: Response = ...
val jsonUnmarshaller: JsonUnmarshaller<YourType> = "... you implementation"
val request: Request = "... you implementation"
val response: Response = "... you implementation"

// The `readSignals` method extracts the signals from the request.
// If you use a web framework, you likely don't need this since the framework probably already handles this in its own way.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ org.gradle.caching=true
datastar.test-suite.version=a7adbacbc9c1a3b27707d7cceba3c02a3f81a86c
groupId=dev.datastar.kotlin
artifactId=kotlin-sdk
version=1.0.0-SNAPSHOT
version=1.0.0-RC1