r/Kotlin • u/vishnu_aravind_dev • 49m ago
r/Kotlin • u/NathanFallet • 1h ago
Incrementally migrate from React Native to Kotlin Multiplatform
github.comI've been working on an open-source project that enables gradual migration from React Native to Kotlin Multiplatform. It lets you call Kotlin functions and render Compose Multiplatform components directly from React Native on both Android and iOS, with automatically generated bindings.
The goal is to migrate one piece at a time until React Native can be removed entirely.
Would love to hear your thoughts!
r/Kotlin • u/Successful_Bank7215 • 20h ago
kSTEP v0.6.0: a type-safe Kotlin DSL for STEP (ISO 10303), now installable without building it from source
gallerykSTEP is a type-safe Kotlin DSL for the STEP standard (ISO 10303), open source under Apache 2.0. You write product structure and geometry as a Kotlin script and get a STEP file. Until now you had to build it from source. v0.6.0 changes that. It is a pre-release, like every 0.x, and the API is unstable.
Install
- Homebrew, macOS on Apple Silicon:
brew install kstep-lang/kstep/kstep - APT repository for Ubuntu 26.04 x86-64 at https://apt.kstep.dev, signed with its own key; the same
.debis in the release - Containers:
ghcr.io/kstep-lang/kstep-cli:0.6.0(JVM only, amd64 and arm64) and:0.6.0-occt(with OpenCascade geometry, linux/amd64 only) - Scoop bucket for Windows: command line only, no geometry
- Twelve library modules on Maven Central, group
dev.kstep, without native libraries
The picture
A two-stage spur gear train: pinions with 10 teeth, gears with 20, module 2.5, involute teeth (each flank is one arc through points of the involute, not the exact curve). Pinion and gear are one part each, used twice, and the colour is set per use:
styleInstance(uA, StepColour.hex("#F39C12"))
styleInstance(uC, StepColour.hex("#F1C40F"))Seven parts, fifteen uses in the assembly. It was built with the DSL and looked at in the viewer of kSTEP Desktop. It is a demo, not an engineered gearbox.
Checked
- Homebrew on an Apple Silicon Mac: install, test, linkage, audit
- The
.deband the APT repository in a clean Ubuntu 26.04 container (amd64, emulated): geometry available, STEP export with geometry, read back without findings - The
-occtimage, the same way; an anonymous pull of both image tags
Not checked, and the limits
- Linuxbrew, and Scoop on Windows (never run there)
- Native ZIP archives for linux-x86-64 and macos-aarch64 (unsigned, not notarized); a manual download and unzip was not tried
- Sketches (PlaneGCS) from a package
- No Intel Macs, no geometry on Windows, APT only for Ubuntu 26.04 amd64
- The
-occtimage ships OpenCascade (LGPL-2.1 with exception); its source offer has not been reviewed by a lawyer - kSTEP Desktop has a built-in MCP server: an agent can read the open script, errors and parts; editing and file actions are separate opt-in switches. Unit tested, not yet tried with a real agent. No desktop download; it runs from source (
./gradlew :kstep-desktop:run)
Details: https://kstep.dev/install · Source: https://github.com/kstep-lang/kSTEP
Criticism is welcome.
r/Kotlin • u/uniVocity • 1d ago
GitHub - jbax/parent: A shared gradle build setup for java projects of any size, whether you're working on a single library, 100+ separate git repositories, or a few multi-module projects sitting side by side.
github.comr/Kotlin • u/Content-Jaguar-578 • 1d ago
How should static analysis reason about Jetpack Compose modifier chains?
I've been exploring static analysis for Jetpack Compose, particularly around identifying layout patterns that can cause problems on tablets, foldables, and resizable windows.
One interesting challenge is deciding when a fixed dimension is actually a problem.
For example:
Box(
modifier = Modifier
.fillMaxWidth()
.height(600.dp)
)This might be perfectly intentional for a particular UI component. But in another context, it could result in clipping or poor space utilization on larger screens.
Similarly:
Modifier.requiredSize(400.dp)can override the normal constraints imposed by the parent.
The difficulty is that simply detecting calls such as height(), width(), or requiredSize() isn't enough to determine whether the code is problematic.
The surrounding modifier chain, parent constraints, and available adaptive mechanisms all matter.
I've been working on a small static analysis project using Kotlin and Gradle to explore these cases, and it has raised a few interesting questions:
- How much context should a static analysis rule consider before reporting a Compose layout issue?
- Is analyzing modifier chains sufficient, or should inspections also understand the surrounding composable structure?
- How would you approach reducing false positives when fixed dimensions are intentional?
- Would it make sense to model adaptive layout expectations as configurable rules rather than universal restrictions?
I'm particularly interested in how people approach these problems when building Kotlin-based static analysis tools.
Curious to hear your thoughts, especially from people who have worked with compiler plugins, PSI, UAST, or Compose tooling.
r/Kotlin • u/bikesched • 2d ago
bikesched 0.2: suspend lambdas and job batches spread across nodes, backed only by PostgreSQL
bikesched is an Apache-2.0 job scheduler for Kotlin and Java with durable steps, backed only by PostgreSQL. 0.2.0 brings two things for Kotlin users:
- Suspend lambdas: handlers, steps, polls and compensations are suspend lambdas, so a Ktor client or a coroutine repository is called directly. Timeouts cancel the coroutine.
- Job batches: a handler starts many child jobs as one durable step and waits for all of them. The items run as regular jobs, so they spread across all your nodes, not just the one that started the batch.
bikesched.handleJobs<Mail>("send-mail") { mail ->
mailClient.send(mail) // a suspending call
}
bikesched.handleJobs<String>("newsletter") { subject ->
val readers = step<List<String>>("readers") { subscribers.emails() }
// one child job per reader, picked up by any node, at most 10 at a time
val batch = startJobBatch<Mail, Unit>("mails", "send-mail", parallelism = 10) {
for (reader in readers) item(Mail(reader, subject), key = reader)
}
// waits without holding a thread; throws if a mail failed for good
batch.await().orElseThrow()
}If the newsletter job is retried, it gets the stored reader list and batch back instead of starting the mails again.
Feedback wanted: still 0.x, so the Kotlin API can change easily. If something feels un-Kotlin-like, tell me.
- Release notes: https://github.com/bikesched/bikesched/releases/tag/v0.2.0
- Kotlin docs: https://bikesched.org/docs/integrations/kotlin/
- GitHub: https://github.com/bikesched/bikesched
r/Kotlin • u/Due_Particular_3514 • 2d ago
Why let your AI agent build UIs that don't match your taste?
youtube.comHonestly, I got tired of arguing with my coding agent over padding, colors, and broken layouts in Jetpack Compose. Agents are great at writing logic, APIs, and state management, but asking them to guess how a screen should look usually takes 10 prompts and still looks generic.
So I flipped the workflow. Instead of prompting the UI, I built a small visual builder on my phone where I drag and drop the exact screens, bars, and colors I want, then scan a QR code to sync the whole project (screens, theme tokens, navigation, plus Room and DataStore) straight into Android Studio.
The plugin diffs everything locally so I can approve or reject each file before it touches my project. Once the UI and local DB are in place, I let my AI agent handle the actual business logic without hallucinating UI layouts.
Here is a quick unedited 2-minute demo of the flow from phone to running app:
https://youtube.com/shorts/W_3NWFafqkc?si=AtC-aVAIFtHHhRY_
I'm pushing this update out in the next few days. Curious how others here handle UI with coding agents—do you let the agent write it from scratch or build the layout yourself first?
r/Kotlin • u/lvmvrquxl • 4d ago
🔍 How do you avoid duplicating data classes and mappers?
I'm building Kotools Facet, a KSP-based Kotlin SDK that removes data class duplication and mapper boilerplate. Declare a class once, and the SDK generates projections at compile-time.
It's still early, and I'd like to hear what Kotlin developers actually need before shaping v1.0.0. Here's the README.
What would stop you from replacing one of your mappers with this? Join the discussion.
r/Kotlin • u/ekaterina-petrova • 5d ago
KotlinConf Black Friday: 35% off conference passes + 10% off workshop add-ons
Hey folks! Our Black Friday offer is live: 35% off conference passes and 10% off workshop add-ons. Get tickets by Sunday, November 29, 23:59 CET.
Join us in Kraków on April 21–23, 2027 for our annual full-stack conference. Meet professional developers from around the world and the team behind Kotlin, exchange ideas, and celebrate together!
The CfP closes November 27; volunteer applications are open until December 21.
Any questions? Happy to answer here.
Gradle Compatibility Timeline
helpermethod.github.ioSlapped/slopped this together in an afternoon to see at a glance which Gradle version is compatible with which Java/Kotlin version. Thought it might be helpful to others.
r/Kotlin • u/dayanruben • 5d ago
Kotlin Benchmark 2.0: How AI Coding Agents Handle Harder Tasks and Closed-Source Code
blog.jetbrains.comBuilt an offline-first RSS reader with Clean Architecture, Room, and Supabase looking for honest technical feedback
reddit.comr/Kotlin • u/dark_devil307 • 6d ago
Can the Kotlin types I use (List, data class) affect how often Compose recomposes?
I'm new to Compose and trying to understand recomposition. I've noticed that my screen state is a data class with a List inside it and I'm wondering if the type of collection matters for how Compose decides to redraw. Does it matter whether I use List a data class or something else? Or is that over-thinking it at my level?
r/Kotlin • u/Ecstatic_Abalone_978 • 6d ago
Dropping Material: a small custom design system in Jetpack Compose, using only CompositionLocals
I wanted my app to stop looking like every other Material 3 app, so I removed material3 entirely. The app depends only on runtime, ui, foundation and animation. The whole theme is about 420 lines of Kotlin. Here's how it fits together.
1. Tokens are plain u/Immutable data classes
The tokens are named by role rather than by Material slots like primary and surface:
data class SignalColors(
val isDark: Boolean,
val paper: Color, // background
val ink: Color, // primary text
val download: Color,
val upload: Color,
val warning: Color, // only used for an over-budget forecast
// …
)The same pattern covers type, spacing, shapes and motion. Light and dark themes are just two instances.
2. One static CompositionLocal per token group
val LocalSignalColors = staticCompositionLocalOf { LightSignalColors }
object Signal {
val colors: SignalColors
u/ReadOnlyComposable get() = LocalSignalColors.current
}Call sites read Signal.colors.ink or Signal.type.body, which looks like MaterialTheme with none of its baggage. I used staticCompositionLocalOf because these values almost never change, so a change recomposing the whole tree is acceptable.
3. A replacement for the ripple
Removing Material also removes the ripple, so I wrote an IndicationNodeFactory that draws a 10% ink wash over the pressed element. It's a Modifier.Node that collects PressInteractions and animates its alpha. It's provided once as LocalIndication, so every clickable uses it automatically.
4. One variable font, roles fixed in code
Mona Sans is a single variable font. FontFamily only resolves fonts by weight, so each type role is built as its own family, with width and optical size set in that family's FontVariation.Settings. Numbers use the wide width, body text the normal width, and the status-bar icon the condensed width.
5. Motion that follows accessibility settings
Motion tokens are tween specs. Compose already scales animation durations by the system animator scale. For animation it can't scale (a chart that scrolls continuously), a ContentObserver watches ANIMATOR_DURATION_SCALE and sets a reduced flag.
6. Plain JVM tests for the palette
A tiny WCAG contrast helper runs in ordinary JUnit tests, so a colour change that fails contrast also fails the build. No emulator is needed.
r/Kotlin • u/PossibleLeather6868 • 6d ago
Made a launch video for our Multiplatform app, would love feedback
Hey everyone!
In April I posted a retrospective on how we built iShape, a nutrition app, using 100% Kotlin: two people, 93% shared mobile code with CMP, a Ktor backend and a Koog AI pipeline. JetBrains much?! And they kindly shared it on their X! 😄
Since then, we've rebuilt our AI agent, and I made a launch video for it on my own by hand and poured a lot of time and love into it, so seeing it finally out in the world feels really special.
Lee, our AI nutrition coach knows your day, every meal you log, your goals, your activities, and much more. You can log your day in one messy text message, or through image (which we worked really hard and benchmarked on a bunch of real weighed meals - but I won't spoil the video for you 🫣). Our approach is getting every food through a real food database, so we're leaving the guessing game behind as much as possible.
Launch video: https://youtu.be/t-pPedDwbo8
Original X post: https://x.com/kotlin/status/2049764780433437104
Would love to hear your honest opinions about the video 🙏
r/Kotlin • u/Content-Jaguar-578 • 6d ago
Exploring Kotlin static analysis inside an IntelliJ Platform plugin using UAST
I've been exploring static code analysis for Android projects while building an IntelliJ-based developer tool.
One interesting challenge has been identifying potential lifecycle and memory-related issues by analyzing Kotlin source code rather than relying entirely on runtime heap analysis.
For example, consider patterns such as:
- A singleton retaining an Activity or Fragment reference.
- Coroutine scopes that outlive the lifecycle of the component that launched them.
- Long-lived callbacks retaining UI-related objects.
- Incorrect ownership of objects across lifecycle boundaries.
The tricky part is that detecting these patterns reliably isn't always straightforward.
Kotlin introduces several language features that make source analysis interesting: extension functions, lambdas, inline functions, delegated properties, higher-order functions, and coroutine scopes.
I've been experimenting with UAST-based inspections to analyze these patterns within the IntelliJ Platform.
A few questions for Kotlin developers who have worked on static analysis:
- How do you approach analyzing Kotlin-specific language constructs when building inspections?
- Do you prefer PSI directly, UAST, or a combination of both for Kotlin analysis?
- How do you handle false positives when detecting lifecycle or object-retention patterns through source code?
- Are there Kotlin compiler APIs or analysis tools you'd recommend exploring for this kind of work?
I'm particularly interested in approaches that go beyond simple syntax matching and can reason about object ownership and lifecycle relationships.
r/Kotlin • u/gagik894 • 7d ago
I built a modern terminal in Kotlin: Meet KetraTerm
galleryHey everyone!
I've just released KetraTerm 1.0, an open-source terminal emulator written in Kotlin.
KetraTerm is a fast, modern terminal with its own JVM-native engine and a custom Swing renderer. It's designed for everyday shell usage as well as demanding terminal applications.
It supports Kitty keyboard, Kitty graphics with image rendering, Unicode 17 graphemes, TrueColor, modern underline styles, hyperlinks, synchronized output, and more.
Besides supporting modern terminal applications, I've been working on features that make everyday terminal usage more convenient:
- Smart suggestions: Complete commands, arguments, paths, and Git branches. The suggestions engine can also learn from successfully executed commands and your usage to improve future results.
- Sticky command headers: Keep the command that produced an output visible while scrolling through it.
- Command navigation: Jump between commands, select entire command blocks, and copy their output.
- Customizable prompts: Choose between gutters and dividers, with visual indicators for failed commands.
- Notifications and progress: Get alerts when long-running commands finish, along with terminal notifications and progress indicators.
I've also put a lot of effort into responsiveness and keeping memory allocations low.
It's available as a desktop terminal for Windows, macOS, and Linux, a JetBrains IDE plugin, and reusable Kotlin/JVM libraries.
The project is open source under the Apache 2.0 license, and I'm continuing to improve compatibility, performance, and the overall user experience.
Contributions are very welcome! Whether you're interested in terminal protocols, performance optimizations, UI improvements, or documentation, feel free to open an issue or submit a PR.
I'd really appreciate feedback, especially from people using complex TUIs or coding agents. I'm also interested in hearing what features you find useful in your current terminal and what you'd like to see improved!
Website / Downloads: https://ketraterm.github.io/KetraTerm/
GitHub: https://github.com/ketraterm/KetraTerm
JetBrains plugin: https://plugins.jetbrains.com/plugin/32589-ketraterm/
r/Kotlin • u/kral_katili • 9d ago
Working on Yalın, a Rust-based JSON parser for Kotlin/Android
I'm working on a JSON parser for Android called Yalın. The core is written in Rust, with a Kotlin/Java API.
It uses ARM NEON SIMD, and I've been trying to keep JNI overhead as low as possible.
In my benchmarks against fastjson2, selective field reads are up to 4.6x faster, while parsing a full 1 MB JSON tree is around 1.3x faster.
Still working on performance, especially for smaller payloads where JNI overhead becomes an issue.
Would be interested in feedback from Kotlin developers, particularly on the API design.
r/Kotlin • u/Its-Amaaboiz • 10d ago
Compose Fast Scrollbar: a draggable scrollbar for lazy lists in Compose Multiplatform
Hi r/Kotlin, I created a CMP scrollbar with an easy-to-use API.
Compose has no draggable scrollbar for lazy lists on Android or iOS (desktop has one, but it's desktop-only). I wanted one in shared UI, so I made a library for it.
LazyColumn(
state = listState,
modifier = Modifier.scrollbar(listState),
) { ... }One modifier in commonMain, works on Android, iOS and desktop:
→ LazyColumn, LazyRow and both lazy grids
→ label bubble while dragging (month, letter, section)
→ handles infinite feeds: pages loading mid-drag keep the thumb under your finger
→ no recompositions while scrolling or dragging
→ per-platform styles from shared code, no expect/actual needed
I published it on Maven Central, and it needs Compose Multiplatform 1.10+.
GitHub: https://github.com/Amaanprobably/compose-fast-scrollbar
I also wrote an easy-to-follow guide with short videos: https://github.com/Amaanprobably/compose-fast-scrollbar/blob/master/GUIDE.md
It's my first library, so feedback is welcome, especially from anyone building with KMP/CMP.
r/Kotlin • u/katia-energizer-jb • 10d ago
From Idea to TestFlight: Building a Kotlin Multiplatform App With an AI Agent
Sebastian Aigner (u/sebi_io) made a 3-minute demo showing how an AI coding agent can use the Kotlin Toolchain to build and ship a Kotlin Multiplatform app. He walks through the workflow, from creating the project to publishing it to TestFlight.
If you haven't looked at it yet: The Kotlin Toolchain is a unified entry point into Kotlin, with a single CLI, a declarative project configuration, and build tooling included. It is open source and in Alpha.
Along the way, Sebastian adds a map and Liquid Glass styling to make parts of the app look native on iOS.
What do you think about this workflow?
r/Kotlin • u/HodorUnofficial • 11d ago
DevView Library
Hi everyone! I wanted to share DevView, a Kotlin Multiplatform library that adds a developer overlay to your Android and iOS apps.
It brings a few debugging tools directly into the app:
- Toggle feature flags and override remote-config values.
- Inspect analytics events as you navigate.
- Mock API responses from OpenAPI specs through a Ktor plugin.
- View console logs on the device.
- Record and restore the current screen’s state with TimeCapsule.
You register only the modules you need, and you can add your own tools. It’s built with Compose Multiplatform, available on Maven Central, and open source under Apache 2.0.
If you’re working on a KMP app, try adding one module to your debug build. I’d love feedback on the setup and which tools would be useful in your day-to-day work.
Docs and setup: https://worldline.github.io/devview/