From f3c52be86d5519fb5ca930f2fc9362d2d15e5cb2 Mon Sep 17 00:00:00 2001 From: darronschall Date: Wed, 15 Feb 2023 16:12:41 -0500 Subject: [PATCH] Prepare version 0.3.0 --- CHANGELOG.md | 13 ++++++++++++- README.md | 12 ++++++------ gradle.properties | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3463dd4..ad946a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.0] - 2023-02-15 + +### Added + + * Runtime - Added helper method to `ServiceException` for checking `304 Not Modified` server response. See [#5](https://github.com/collectiveidea/twirp-kmm/pull/5). + +### Changed + + * Generator - Generated service methods now return a `Pair`, to access response headers. See [#4](https://github.com/collectiveidea/twirp-kmm/pull/4). + * Generator - `requestHeaders` type changed from `Map` to `Header` for consistency with `Pair` result. See [#4](https://github.com/collectiveidea/twirp-kmm/pull/4). + ## [0.2.0] - 2023-02-13 ### Added - * Generated service methods now accept optional request headers. See [#2](https://github.com/collectiveidea/twirp-kmm/pull/2). + * Generator - Generated service methods now accept optional request headers. See [#2](https://github.com/collectiveidea/twirp-kmm/pull/2). ## [0.1.0] - 2022-12-05 diff --git a/README.md b/README.md index 88648c2..1b67d02 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ In general, follow [PBandK Usage](https://github.com/streem/pbandk#usage) instru ### Usage -Download the latest release, currently `0.2.0`, and pass it to `protoc` via `pbandk`: +Download the latest release, currently `0.3.0`, and pass it to `protoc` via `pbandk`: ```bash # Download the library to ~ cd ~/ -curl -OL https://github.com/collectiveidea/twirp-kmm/releases/download/0.2.0/twirp-kmm-generator-0.2.0.jar +curl -OL https://github.com/collectiveidea/twirp-kmm/releases/download/0.3.0/twirp-kmm-generator-0.3.0.jar ``` @@ -23,7 +23,7 @@ Pass the jar and generator class name as the `kotlin_service_gen` option to `pba ```bash cd ~/exampleProject -protoc --pbandk_out=kotlin_service_gen='~/twirp-kmm-generator-0.2.0.jar|com.collectiveidea.twirp.Generator',kotlin_package=com.example.api:src/main/kotlin src/main/proto/example.proto +protoc --pbandk_out=kotlin_service_gen='~/twirp-kmm-generator-0.3.0.jar|com.collectiveidea.twirp.Generator',kotlin_package=com.example.api:src/main/kotlin src/main/proto/example.proto ``` ### Build @@ -34,12 +34,12 @@ To build the library locally, run: ./gradlew build ``` -This creates the versioned `.jar` file, e.g. `generator/build/libs/twirp-kmm-generator-0.2.0-SNAPSHOT.jar` +This creates the versioned `.jar` file, e.g. `generator/build/libs/twirp-kmm-generator-0.3.0-SNAPSHOT.jar` Then, the built version can be used, instead of the latest release, by supplying the path to the built `.jar`, e.g.: ```bash -protoc --pbandk_out=kotlin_service_gen='/Users/darron/Development/twirp-kmm/generator/build/libs/twirp-kmm-generator-0.2.0-SNAPSHOT.jar|com.collectiveidea.twirp.Generator',kotlin_package=com.example.api:shared/src/commonMain/kotlin shared/src/commonMain/proto/example.proto +protoc --pbandk_out=kotlin_service_gen='/Users/darron/Development/twirp-kmm/generator/build/libs/twirp-kmm-generator-0.3.0-SNAPSHOT.jar|com.collectiveidea.twirp.Generator',kotlin_package=com.example.api:shared/src/commonMain/kotlin shared/src/commonMain/proto/example.proto ``` ## Runtime @@ -49,7 +49,7 @@ The runtime provides an [`installTwirp`](./runtime/src/commonMain/kotlin/com/col First, add the runtime as a dependency: ``` -implementation "com.collectiveidea.twirp:twirp-kmm-runtime:0.2.0" +implementation "com.collectiveidea.twirp:twirp-kmm-runtime:0.3.0" ``` Then, configure the HttpClient and pass the client into the generated service constructor: diff --git a/gradle.properties b/gradle.properties index 4a72a00..7c255e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=0.2.0 +version=0.3.0 group=com.collectiveidea.twirp kotlin.code.style=official