Skip to content

Support Kotlin 2.3.0#18

Open
sky130 wants to merge 15 commits into
deepmedia:mainfrom
sky130:main
Open

Support Kotlin 2.3.0#18
sky130 wants to merge 15 commits into
deepmedia:mainfrom
sky130:main

Conversation

@sky130

@sky130 sky130 commented Apr 25, 2026

Copy link
Copy Markdown

No description provided.

sky130 added 5 commits April 25, 2026 21:17
* Update Kotlin to 2.3.0
* Update Gradle to 9.0
* Update MavenDeployer to 0.18.0
* Update Shadow to 9.4.1
*   Update IR element accessors to use `arguments`, `typeArguments`, and `parameters` instead of deprecated `valueParameters`, `putValueArgument`, etc.
*   Support `IrParameterKind` for filtering extension, regular, and context parameters.
*   Update `IrConst` usage to use type-safe value access.
*   Replace `IrElementVisitorVoid` with `IrVisitorVoid`.
*   Fix `capitalize` deprecations in Gradle plugin and compiler.
*   Improve IR building logic for lambdas and constructor calls to match new compiler requirements.
*   Update `KneeLogger` to use `InternalSymbolFinderAPI` for finding standard library functions.
*   Refactor `UnpackageCodegenSources` task to be an abstract class.
* Update KneeComponentRegistrar to include pluginId
* Fix parameter mapping in UpwardFunctions to use resolved codec types
* Cleanup unused imports in ImportInfo.kt
* Set backing field visibility to private in IrUtils
* Update KneeComponentRegistrar constructor and pluginId
* Fix argument indexing in initKnee transformation
* Add more descriptive error message for vararg element extraction
@sky130

sky130 commented Apr 25, 2026

Copy link
Copy Markdown
Author

I run on my application, it works


51a4a1417fb9436662a030b69164ae10 8712a9a4aa789d19219d3c4a6e0cb5c0

@sky130 sky130 marked this pull request as draft April 25, 2026 17:02
sky130 added 6 commits April 26, 2026 01:12
* Handle IrClass in addition to IrFile when determining package name
* Improve error handling for unexpected declaration parents
* Remove `@JvmStatic` annotation from JNI private functions as they are not necessarily members of named or companion objects
* Minor whitespace cleanup
* Support type arguments in `ParameterizedTypeName.disambiguationName`
* Update `CodegenFunction` UID logic
* Implement `containerForDeclaration` to build a `CodegenDeclaration` hierarchy
* Refactor `KneeInterface` to use the new container resolution logic
* Support companion object and property accessor detection during container generation
…ler plugin

* Introduce `ensureContainer` in `KneeCodegen` to safely resolve or prepare declaration containers.
* Update `KneeLogger` to use `CallableId` and `FqName` for finding `println` functions, improving compatibility with IR symbol finder APIs.
* Refactor parameter mapping in `UpwardFunctions` to use name-based lookup and improve type substitution logic.
* Enhance `KneeCodegen` IR preparation to handle constructor logic in file-level containers and improve code formatting.
* Standardize container acquisition across classes, interfaces, objects, properties, and functions using the new `ensureContainer` helper.
* Update Kotlin to 2.3.0 across test modules
* Update Android Gradle Plugin to 8.13.0 across test modules
* Add `@KneeClass` and `@Knee` annotations to `Outer` class and `Inner.value` property in `test-interfaces` definitions
@sky130 sky130 marked this pull request as ready for review April 26, 2026 10:37
sky130 added 4 commits April 26, 2026 20:10
- fix parameter mapping for imported suspend interface members
- fix reverse FlowCollector.emit invocation on JVM
- fix method(key) lookup in generated interface wrappers
- improve JNI wrapper reference lifecycle for imported interfaces
- add regression tests for direct StateFlow access
- bind downward member-call arguments by actual IR parameter slots
instead of filtered regular-parameter indexes
- fix imported interface adapters to use the same slot mapping
- prevent @kneeclass member calls like getString(key, default)
from dropping the trailing argument at runtime
- fix native exception rethrow bridging to pass both env and throwable
- add regression coverage for class members with multiple parameters
Fix generated IR for collection helpers such as encodeArray,
decodeIntoArray, encodeList and decodeIntoList by assigning the
JniEnvironment extension receiver and collection argument to their
actual parameter slots.

This prevents Kotlin/Native IrLinkageError crashes where encodeArray
or decodeIntoArray is called without the array parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant