diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f14fef62..e121ccd91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,9 +16,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 + distribution: 'zulu' - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build and test with Gradle diff --git a/CHANGELOG.md b/CHANGELOG.md index f057807ff..5e4fbc32e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,31 +1,33 @@ 1.0.0-beta12 (Not released) ======================================== -**Breaking Changes: ** +## Breaking Changes: wrapResponse from SuspendResponseConverter got renamed to wrapSuspendResponse. This add the possibility to have ResponseConverter and SuspendResponseConverter implemented in the same class. -**Changes: ** +## Changes: - throw compiler time error when you use @Path without the corresponding value inside the relative url path - every generated implementation class of an interface that Ktorfit generates will now contain a "create" ext function that can be used instead of the generic create() function e.g. Let's say you have a interface GithubService -'''kotlin +```kotlin val kttorfit = ktorfit { baseUrl("http://example.com/") }.create() -''' - +``` or this -'''kotlin +```kotlin val kttorfit = ktorfit { baseUrl("http://example.com/") }.createGithubService() -''' +``` By default, IntelliJ/Android Studio can't find the generated code, you need to add the KSP generated folder to the sourcesets like this: +```kotlin kotlin.srcDir("build/generated/ksp/jvm/jvmMain/") +``` + 1.0.0-beta11 (21-08-2022) ======================================== @@ -42,30 +44,41 @@ kotlin.srcDir("build/generated/ksp/jvm/jvmMain/") - @PATCH, @POST, @PUT now have a default value #22 - Ktorfit now uses a builder pattern for setup e.g. change this: - Ktorfit("https://example.com/", HttpClient {}) + ```kotlin + Ktorfit("https://example.com/", HttpClient {}) +``` + to this: +```kotlin Ktorfit.Builder() .baseUrl("https://example.com/") .httpClient(HttpClient {}) .build() +``` + - -**Breaking Changes: ** +## Breaking Changes: @Headers now requires a vararg of String instead of an Array e.g. you need to change from: +```kotlin @Headers( ["Authorization: token ghp_abcdefgh", "Content-Type: application/json"] ) +``` -to this: +to this: +```kotlin @Headers( "Authorization: token ghp_abcdefgh", "Content-Type: application/json" ) +``` + 1.0.0-beta09 ======================================== diff --git a/sandbox/build.gradle.kts b/sandbox/build.gradle.kts index 50d9ff0ff..3ccde3ee1 100644 --- a/sandbox/build.gradle.kts +++ b/sandbox/build.gradle.kts @@ -56,7 +56,7 @@ kotlin { dependencies { implementation("io.ktor:ktor-client-core-jvm:$ktorVersion") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-rx3:1.6.4") - implementation("io.reactivex.rxjava3:rxjava:3.1.3") + implementation("io.reactivex.rxjava3:rxjava:3.1.5") implementation("io.ktor:ktor-client-gson:$ktorVersion") implementation("io.ktor:ktor-client-logging:$ktorVersion")