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

Missing targets and Plugin extension update #757

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DatL4g
Copy link
Contributor

@DatL4g DatL4g commented Jan 6, 2025

Previously missing targets

  • androidNativeArm32
  • androidNativeArm64
  • androidNativeX86
  • androidNativeX64

Annotations

This module only has an additional target as there is no ktor core library (yet).

  • wasmWasi

Plugin extension

⚠️ BREAKING CHANGE ⚠️

  • Renamed the extension to match the default naming conventions KtorfitGradleConfiguration -> KtorfitPluginExtension.
  • Added better methods to register and get the extension.
  • Switched from eager to lazy properties
  • Added kotlinVersion to specify the compiler plugin kotlin version.

So the updated ktorfit gradle configuration in a build script looks like this:

ktorfit {
  generateQualifiedTypeName.set(true|false)
  errorCheckingMode.set(ErrorCheckingMode.<TYPE>)
  
  // new
  kotlinVersion.set("2.x.x")
}

Kotlin version

⚠️ This feature is untested as testing Gradle Plugins is a pain, however the other changes should work as expected since I have a similar setup in my Gradle Plugin for https://github.com/DatL4g/Sekret.

Currently the used Kotlin version in the project is detected, this can cause problems when using non-major releases.
For example I need to use version 2.1.10-RC-449 because of a Kotlin/Native bug, but this results in the following error:

Could not find de.jensklingenberg.ktorfit:compiler-plugin:2.1.0-2.1.10-RC-449

Now it's possible to specify 2.1.0 as Kotlin version and it will resolve de.jensklingenberg.ktorfit:compiler-plugin:2.1.0-2.1.0

Documentation and changelog

I did no changes to the Changelog as I'm not sure how you want to communicate these changes exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant