Skip to content

HTTP client generator / KSP plugin for Kotlin Multiplatform (Android, iOS, Js, Jvm, Native) using KSP and Ktor clients inspired by Retrofit https://foso.github.io/Ktorfit

License

Notifications You must be signed in to change notification settings

forrestpangborn/Ktorfit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ktorfit

All Contribtors PRs Welcome jCenter Documentation

Platforms

Introduction

Ktorfit is a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform ( Android, iOS, Js, Jvm, Linux) using KSP and Ktor clients inspired by Retrofit

Show some ❤️ and star the repo to support the project

GitHub stars GitHub forks Twitter Follow

How to use

Please see the documentation at https://foso.github.io/Ktorfit/

Compatibility

Version Kotlin KSP Ktor
latest 1.8.20 1.0.11 2.3.0
1.2.0 1.8.20 1.0.10 2.3.0
1.1.0 1.8.20 1.0.10 2.2.4

Release

build.gradle.kts:

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

configure<de.jensklingenberg.ktorfit.gradle.KtorfitGradleConfiguration> {
    version = "1.3.0"
}

build.gradle

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

ktorfit{
    version = "1.3.0"
}

KSP:

de.jensklingenberg.ktorfit:ktorfit-ksp:1.3.0

Ktorfit-lib/-light:

implementation("de.jensklingenberg.ktorfit:ktorfit-lib:1.3.0")
or
implementation("de.jensklingenberg.ktorfit:ktorfit-lib-light:1.3.0")

👷 Project Structure

  • compiler plugin - module with source for the compiler plugin

  • ktorfit-annotations - module with annotations for the Ktorfit

  • ktorfit-ksp - module with source for the KSP plugin

  • ktorfit-lib-common - module with source for the Ktorfit lib

  • ktorfit-lib - ktorfit-lib-common + dependencies on platform specific clients

  • sandbox - experimental test module to try various stuff

  • example - contains example projects that use Ktorfit

  • docs - contains the source for the GitHub page

✍️ Feedback

Feel free to send feedback on Twitter or file an issue. Feature requests/Pull Requests are always welcome.

Acknowledgments

Some parts of this project are reusing ideas that are originally coming from Retrofit from Square. Thank you for Retrofit!

Thanks to JetBrains for Ktor and Kotlin!

Credits

Ktorfit is brought to you by these contributors.

📜 License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details

About

HTTP client generator / KSP plugin for Kotlin Multiplatform (Android, iOS, Js, Jvm, Native) using KSP and Ktor clients inspired by Retrofit https://foso.github.io/Ktorfit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 99.1%
  • Other 0.9%