Skip to content

v1.0.0-beta12

Compare
Choose a tag to compare
@Foso Foso released this 31 Aug 19:15
· 735 commits to master since this release

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