Commit 48f7ab5
committed
feat(typings): describe Kotlin internals and nullability in generated definitions
Moves the dts-generator to the current main, which changes what the generated
definitions describe:
- Kotlin internal classes and members no longer appear. The JVM has no internal
modifier, so without reading @kotlin.Metadata they were indistinguishable
from public API. Their names are also mangled with the module they were
compiled in, which differs between debug and release, so nothing could call
them across both anyway.
- Reference types known to be nullable are described as unions with null.
Kotlin metadata states nullability exactly; on the Java side @nullable and
@nonnull decide, and what carries neither is left as it was rather than being
claimed non-null. Definitions built from android.jar gain 4,565 null unions
at compileSdk 35 and change in no other way.
- A class defined by several input jars can be generated from all of them at
once, for definitions spanning multiple platform jars, where a member a newer
platform dropped still has to be described. Off unless asked for.
The generator's own command line moved to a double dash spelling, so the task
driving it follows. The single dash spelling still works and is what a packaged
framework from an older release passes; the two ship together, so they cannot
disagree.1 parent 4fbb006 commit 48f7ab5
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
1056 | | - | |
| 1056 | + | |
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
| |||
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | | - | |
| 1065 | + | |
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| |||
Submodule android-dts-generator updated 6 files
- dts-generator/src/main/java/com/telerik/InputParameters.java+10
- dts-generator/src/main/java/com/telerik/Main.java+327-171
- dts-generator/src/main/java/com/telerik/dts/ClassRepo.java+16-12
- dts-generator/src/main/java/com/telerik/dts/DtsApi.java+91-8
- dts-generator/src/main/java/com/telerik/dts/KotlinTypeInfo.java+103-9
- dts-generator/src/main/java/com/telerik/dts/Nullability.java+55
0 commit comments