Skip to content

Releases: Foso/Ktorfit

v1.0.0-beta17

21 Jan 10:03
11565eb
Compare
Choose a tag to compare

BREAKING CHANGE:

  • Ktorfit now needs an additional gradle plugin. This will solve serveral issues with multi-module projects.

Add this plugin:

plugins {
  id "de.jensklingenberg.ktorfit" version "1.0.0"
}

NEW

  • interfaces can now be internal

FIXED

  • Ktorfit multiple module support #92
  • Add support for 'internal' parameter type #13
  • Duplicate class KtorfitExtKt found in modules moduleA and moduleB #86
  • Android overload resolution ambiguity #64
  • Form data is double encoded #95

⬆️ Deps updates

  • based on Ktor 2.2.2
  • Kotlin 1.8.0
  • KSP 1.8.0-1.0.8
  • update Android TargetSdk to 33

v1.0.0-beta16

13 Nov 16:11
Compare
Choose a tag to compare

1.0.0-beta16 (13-11-2022)

NEW:

  • Field parameters can now be nullable, null values will be ignored in requests

  • Add option to turn of error checking

    ksp {
    arg("Ktorfit_Errors", "1")
    }

    You can set it in your build.gradle.kts file,

    0: Turn off all Ktorfit related error checking

    1: Check for errors

    2: Turn errors into warnings

  • Added RequestConverter support #84

⬆️ Deps updates

  • based on Ktor 2.1.3
  • Kotlin 1.7.21
  • KSP 1.0.8
  • update Android TargetSdk to 33

🐛 Bugs fixed

  • FlowResponseConverter #81

What's Changed

  • build(deps): bump logback-classic from 1.4.0 to 1.4.3 by @dependabot in #74
  • Foso/revert converters changes by @Foso in #76
  • 67 add nullable field parameters support by @Foso in #80
  • fix: FlowResponseConverter by @Foso in #81
  • Added RequestConverter support by @DatL4g in #84
  • feat: add option to turn off error checking #77 by @Foso in #88

Full Changelog: v1.0.0-beta15...v1.0.0-beta16

v1.0.0-beta15

05 Oct 18:37
Compare
Choose a tag to compare

1.0.0-beta15 (05-10-2022)

⬆️ Deps updates

  • based on Ktor 2.1.2

🐛 Bugs fixed

  • kotlinx.coroutines.JobCancellationException: Parent job is Completed #70

💥 Breaking changes

  • reverted the api of converters to the state of beta13, see #71
  • when you are updating from beta13, this is the only change to converters:
    returnTypeName is replaced through typeData, you can use typeData.qualifiedName to get the same value as returnTypeName

v1.0.0-beta14

24 Sep 12:06
Compare
Choose a tag to compare

NEW:

Query parameters can now be nullable, null values will be ignored in requests
Function return types can now be nullable

FIX:

Url annotation not resolved correctly #65

BREAKING CHANGES:

Changed naming of Converters:
    SuspendResponseConverter:
        is now called RequestConverter
        the wrapSuspendResponse is now called convertRequest.
        returnTypeName is replaced through typeData, you can use typeData.qualifiedName to get the same value as returnTypeName RequestConverter need to be added with the requestConverter() on your Ktorfit object.
        https://foso.github.io/Ktorfit/requestconverter/
    ResponseConverters:
        returnTypeName is replaced through typeData, you can use typeData.qualifiedName to get the same value as returnTypeName         
        https://foso.github.io/Ktorfit/responseconverter/

Full Changelog: v1.0.0-beta13...v1.0.0-beta14

v1.0.0-beta13

10 Sep 10:13
Compare
Choose a tag to compare

1.0.0-beta13 (10-09-2022)

  • KtorfitCallResponseConverter and KtorfitSuspendCallResponseConverter are now combined in KtorfitCallResponseConverter
  • based on Ktor 2.1.1

Fixed:

  • Url annotation not resolved correctly #52

Full Changelog: v1.0.0-beta12...v1.0.0-beta13

v1.0.0-beta12

31 Aug 19:15
Compare
Choose a tag to compare

1.0.0-beta12 (31-08-2022)

Breaking Changes:

wrapResponse from SuspendResponseConverter got renamed to wrapSuspendResponse. This add the possibility to have ResponseConverter and SuspendResponseConverter implemented in the same class.

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, then you can create an instance like this:
val kttorfit = ktorfit {
baseUrl("http://example.com/")
}.create<GithubService>()

or this

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: (See more here: https://kotlinlang.org/docs/ksp-quickstart.html#make-ide-aware-of-generated-code)

kotlin.srcDir("build/generated/ksp/jvm/jvmMain/")

Commits

Full Changelog: v1.0.0-beta11...v1.0.0-beta12

v1.0.0-beta11

21 Aug 20:26
Compare
Choose a tag to compare

What's Changed

  • you can now use ResponseConverter in combination with suspend functions. Implement the SuspendResponseConverter
  • KtorfitCallResponseConverter and FlowResponseConverter moved to de.jensklingenberg.ktorfit.converter.builtin

New Contributors

Full Changelog: v1.0.0-beta10...v1.0.0-beta11

v1.0.0-beta10

18 Aug 20:29
Compare
Choose a tag to compare

What's Changed

  • based on Ktor 2.0.2
  • added windows target #26
  • annotations 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 {})
    to this:
    Ktorfit.Builder() .baseUrl("https://example.com/") .httpClient(HttpClient {}) .build()

Breaking Changes:

@headers now requires a vararg of String instead of an Array
e.g. you need to change from:
@headers( ["Authorization: token ghp_abcdefgh", "Content-Type: application/json"] )
to this:
@headers( "Authorization: token ghp_abcdefgh", "Content-Type: application/json" )

New Contributors

Thanks to @DatL4g, @hadiyarajesh, @DanielNovak for reporting bugs

Full Changelog: v1.0.0-beta08...v1.0.0-beta10

v1.0.0-beta09

13 Jul 09:52
Compare
Choose a tag to compare

What's Changed

  • #15 fix encoding of query parameters

Full Changelog: v1.0.0-beta08...v1.0.0-beta09

v1.0.0-beta08

11 Jul 14:57
Compare
Choose a tag to compare

fixed issue with Koin Annotations

Full Changelog: v1.0.0-beta07...v1.0.0-beta08