Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump de.jensklingenberg.ktorfit:ktorfit-lib from 1.14.0 to 2.0.0 #171

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 28, 2024

Bumps de.jensklingenberg.ktorfit:ktorfit-lib from 1.14.0 to 2.0.0.

Release notes

Sourced from de.jensklingenberg.ktorfit:ktorfit-lib's releases.

2.0.0 - 2024-05-27

Changed

  • Build with KSP 1.0.21, Kotlin 2.0.0, Ktor 2.3.11
  • The needed dependencies for Ktorfit KSP processor are now included in the Ktorfit Gradle plugin. You can remove the ksp() block from your build.gradle.kts file. You still need to apply the KSP plugin.
plugins {
id("com.google.devtools.ksp") version "CURRENT_KSP_VERSION"
id("de.jensklingenberg.ktorfit") version "2.0.0"
}

See the installation guide for more information: https://foso.github.io/Ktorfit/installation/

  • The code that is generated by KSP is now accessible from the module where the interface is defined. That means code from commonMain can now find the generated code. Generated code from the platform specific code is still only available from the specific modules.
  • The create function is now deprecated. The reason for that is that it is relying on a compiler plugin to work. This can lead to compile errors when the class can't be found. The plan is to get rid of the plugin. When your project is configured correct, the autocompletion should show an extension function create followed by the name of the interface. This function will not trigger the compiler plugin
val api = ktorfit.create<ExampleApi>()

replace with:

val api = ktorfit.createExampleApi()

Breaking Changes

The deprecated code got removed. This will simplify the codebase and make it easier to maintain. When you haven't used the deprecated converters, there is not much you need to change. The dependencies for the converters that were previously auto added now need to be added manually. See the migration guide for more information: https://foso.github.io/Ktorfit/migration/#from-2-to-200

  • QualifiedTypeName in Ktorfit

In the previous versions of Ktorfit, the qualifiedTypename was always generated in the code. This was used in the TypeData.createTypeData() function to provide a fully qualified type name for the data type being used.

val _typeData = TypeData.createTypeData(
    typeInfo = typeInfo<Call<People>>(),
    qualifiedTypename = "de.jensklingenberg.ktorfit.Call<com.example.model.People>"
)

In the new version of Ktorfit, this behavior has been changed. Now, by default, Ktorfit will keep qualifiedTypename for TypeData in the generated code empty. This means that the qualifiedTypename will not be automatically generated.

</tr></table> 

... (truncated)

Changelog

Sourced from de.jensklingenberg.ktorfit:ktorfit-lib's changelog.

2.0.0 - 2024-05-27

Changed

  • Build with KSP 1.0.21, Kotlin 2.0.0, Ktor 2.3.11
  • The needed dependencies for Ktorfit KSP processor are now included in the Ktorfit Gradle plugin. You can remove the ksp() block from your build.gradle.kts file. You still need to apply the KSP plugin.
plugins {
id("com.google.devtools.ksp") version "CURRENT_KSP_VERSION"
id("de.jensklingenberg.ktorfit") version "2.0.0"
}

See the installation guide for more information: https://foso.github.io/Ktorfit/installation/

  • The code that is generated by KSP is now accessible from the module where the interface is defined. That means code from commonMain can now find the generated code. Generated code from the platform specific code is still only available from the specific modules.
  • The create function is now deprecated. The reason for that is that it is relying on a compiler plugin to work. This can lead to compile errors when the class can't be found. The plan is to get rid of the plugin. When your project is configured correct, the autocompletion should show an extension function create followed by the name of the interface. This function will not trigger the compiler plugin
val api = ktorfit.create<ExampleApi>()

replace with:

val api = ktorfit.createExampleApi()

Breaking Changes

The deprecated code got removed. This will simplify the codebase and make it easier to maintain. When you haven't used the deprecated converters, there is not much you need to change. The dependencies for the converters that were previously auto added now need to be added manually. See the migration guide for more information: https://foso.github.io/Ktorfit/migration/#from-2-to-200

  • QualifiedTypeName in Ktorfit

In the previous versions of Ktorfit, the qualifiedTypename was always generated in the code. This was used in the TypeData.createTypeData() function to provide a fully qualified type name for the data type being used.

val _typeData = TypeData.createTypeData(
    typeInfo = typeInfo<Call<People>>(),
    qualifiedTypename = "de.jensklingenberg.ktorfit.Call<com.example.model.People>"
)

In the new version of Ktorfit, this behavior has been changed. Now, by default, Ktorfit will keep qualifiedTypename for TypeData in the generated code empty. This means that the qualifiedTypename will not be automatically generated.

</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [de.jensklingenberg.ktorfit:ktorfit-lib](https://github.com/Foso/Ktorfit) from 1.14.0 to 2.0.0.
- [Release notes](https://github.com/Foso/Ktorfit/releases)
- [Changelog](https://github.com/Foso/Ktorfit/blob/master/docs/CHANGELOG.md)
- [Commits](Foso/Ktorfit@1.14.0...2.0.0)

---
updated-dependencies:
- dependency-name: de.jensklingenberg.ktorfit:ktorfit-lib
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from ansman as a code owner May 28, 2024 13:58
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 28, 2024
@ansman ansman added this to the K2 milestone Jul 20, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 9, 2024

Superseded by #204.

@dependabot dependabot bot closed this Aug 9, 2024
@dependabot dependabot bot deleted the dependabot/gradle/de.jensklingenberg.ktorfit-ktorfit-lib-2.0.0 branch August 9, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant