-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor to context-params #128
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
base: develop
Are you sure you want to change the base?
Changes from all commits
591ad16
9bd3510
24049fc
fa9dbf9
ef91ad0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,34 @@ | ||
| [versions] | ||
| agp = "8.9.0" | ||
| kotlin = "2.1.10" | ||
| ksp = "2.1.10-1.0.31" # Must be compatible with: `kotlin` | ||
| kotlin = "2.2.0" | ||
| ksp = "2.2.0-2.0.2" # Must be compatible with: `kotlin` | ||
|
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify compatibility between Kotlin 2.2.0 and KSP 2.2.0-2.0.2. The major Kotlin version upgrade may introduce breaking changes or require adjustments in existing code. 🌐 Web query: 💡 Result: Short answer: Yes — there are a few compatibility changes you should be aware of when moving from Kotlin 2.1.10 → 2.2.0, and the biggest user-facing change around the context feature is that context receivers are being replaced by the new context parameters preview. You can keep compiling, but you’ll likely need small code/build/IDE changes if your code uses context receivers (or other now-stricter language checks). (blog.jetbrains.com, kotlinlang.org) What matters most (context parameters)
Other important breaking/deprecation items in Kotlin 2.2.0 you should check when upgrading from 2.1.10
Practical checklist to upgrade safely
If you want, I can:
Which would you prefer? Citations:
Ensure Kotlin 2.2.0 and KSP 2.2.0-2.0.2 Compatibility Kotlin 2.2.0 introduces several source‐breaking changes—including the switch from context receivers to context parameters (preview), stricter language checks, and a new Gradle DSL for compiler flags—that you must address when upgrading. Please update your build and code as follows: • File gradle/libs.versions.toml (lines 3–4) kotlin = "2.2.0"
ksp = "2.2.0-2.0.2" # aligns with Kotlin 2.2.0• Build script changes
• Context-parameters migration
• Global compatibility checks
• Verify changes
🤖 Prompt for AI Agents |
||
| desugarLibs = "2.1.5" | ||
| androidxLifecycle = "2.8.6" | ||
| androidxComposeBom = "2024.10.00" | ||
| jetbrainsComposeRuntime = "1.7.0" # Needs to align with version in Compose BOM as closely as possible | ||
| androidxActivity = "1.9.2" | ||
| decompose = "3.1.0" | ||
| essenty = "2.1.0" | ||
| koin = "3.5.6" | ||
| koinAnnotations = "1.4.0" # Must be compatible with: `ksp` | ||
| kotlinx-coroutines = "1.8.1" | ||
| koin = "4.1.0" | ||
| koinAnnotations = "2.1.0" # Must be compatible with: `ksp` | ||
| kotlinx-coroutines = "1.10.2" | ||
| kotlinx-immutableCollections = "0.3.8" | ||
| kotlinx-dateTime = "0.6.1" | ||
| ktlintGradlePlugin = "12.2.0" | ||
| ktlint = "1.5.0" | ||
| detektGradlePlugin = "1.23.8" | ||
| composeLint = "1.3.1" | ||
| apollo = "4.0.0" | ||
| ktorfit = "2.4.0" # Must be compatible with: `ksp` | ||
| ktor = "3.1.0" # Must be compatible with: `ktorfit` | ||
| apollo = "4.3.1" | ||
| ktorfit = "2.6.1" # Must be compatible with: `ksp` | ||
| ktor = "3.2.1" # Must be compatible with: `ktorfit` | ||
| kotlinx-serialization = "1.8.0" # Must be compatible with: `kotlin` | ||
| timber = "5.0.1" | ||
| kermit = "2.0.2" | ||
| skie = "0.10.1" # Must be compatible with: `kotlin` | ||
| kermit = "2.0.6" | ||
| skie = "0.10.4" # Must be compatible with: `kotlin` | ||
| buildkonfig = "0.15.2" | ||
| nsExceptionKt = "1.0.0-BETA-7" | ||
| datastore = "1.1.1" | ||
| moko-resources = "0.24.5" | ||
| moko-resources = "0.25.0" | ||
| baselineProfile = "1.3.0" | ||
| junit = "1.2.1" | ||
| espressoCore = "3.6.1" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the necessity of disabling Gradle optimizations.
Disabling both caching and configuration cache will significantly slow down build times. These optimizations are generally safe and recommended for most projects.
Please confirm that these optimizations need to be disabled for this specific refactor. If they're causing issues with the context parameters feature or the architectural changes, consider:
🏁 Script executed:
Length of output: 1151
Re-enable Gradle caching and configuration-cache by default
Our search didn’t surface any custom tasks or configurations that are known to break Gradle’s caching features—only the flags in gradle.properties themselves. Disabling both org.gradle.caching and org.gradle.configuration-cache will noticeably slow down every build. Unless you’ve encountered concrete cache-related errors in this refactor, please restore the defaults and, if needed, opt out specific tasks or plugins instead of disabling globally.
• File: gradle.properties
Lines 4–6:
If you’ve run into build failures or stale outputs tied to configuration-cache or build caching, please document those errors and exclude only the incompatible tasks/plugins. Otherwise, let’s turn these optimizations back on to keep builds fast.
📝 Committable suggestion
🤖 Prompt for AI Agents