r/Kotlin • • 9h ago

3 months after 1.0.0 of my PostgreSQL driver in Kotlin

10 Upvotes

Hello, that's my second post on this subreddit. The first one was about version 1.0.0 of my PostgreSQL driver written in Kotlin. Now, 3 months later, I have version 2.15.0. Why am I writing a post for that version? I don't know, just because.

A little context

Last time there were only one and a half sentences about it. I use the driver in my own app: a desktop app for Windows on Compose and Koin, with a Ktor server and a browser extension.

The most natural question is why even use Postgres for a desktop app, and that's simple: the database was BEFORE the application. A database with enums and arrays, and after some time also trigrams. Migrating away from Postgres is now probably impossible, and away from my driver too, because I return data as anonymous rows (record and record[]) and now also read them into nested classes.

About the driver

2.15.0 is the 19th published version after 1.0.0. I version by "reach of a change" (it's in the README), so even with other breaking changes only 2.0.0 got a new major: since then a query pins one type catalog for its whole execution.

A correction to the previous post: requiring protocol 3.2 wasn't that great an idea. PgBouncer (at least 1.25) ends on 3.0, so the driver still asks for 3.2 but accepts 3.0 and checks the server_version parameter instead. I also added a check that search_path is reported at all.

The JDBC facade

When you first think about it, it should be easy, right? You throw "not implemented" on most methods and there are no problems. Well, it's not that easy. I describe this from the side of Spring and Hikari, because I don't know if it would even work with other libraries (probably not).

First, how do you even get to your own API? First thought: unwrap. You get the native connection, and its close closes the socket. So you must have a layer above Connection.

Great, now the next problem: how to make Hikari aware that a connection is dead when you don't use Statement/PreparedStatement. Hikari wraps the connection and statements in proxies and checks the SQLSTATE of each SQLException passing through. Maybe you think you don't need this because isValid exists? If a connection was used in the last 500 ms (aliveBypassWindowMs), Hikari hands it out without calling isValid. So you MUST have a way to tell Hikari to evict the connection. I do it by calling abort() instead of close() on the proxy, and having my abort() throw a SQLException with a prepared SQLSTATE so Hikari catches it and evicts the connection.

Spring isn't that easy either. After some time I found that I MUST have DatabaseMetaData, because Spring asks it about savepoint support. Then there are the problems with JdbcTransactionManager, which was written a long time ago. Timeouts, for example: I don't have setQueryTimeout, because I don't have statements, so I changed them to SET LOCAL commands.

And in all this you have the worst enemy: SQLException. It was the hardest fight. All JDBC libraries rely on JDBC throwing SQLException. Not any other, only SQLException. Even if you don't like it, you must use it. I wrap my exception in a wrapper with a copied SQLSTATE, without a cause and even without a stack trace, and unwrap it again in my API. In Spring I ended up writing my own class inheriting from AbstractPlatformTransactionManager...

Even with these pain points I think it was worth it, because you really can use it in Spring and the configuration is easy.

Mostly fixes

When I think about it, most versions have fixes, not new features. Integration tests are better than unit tests, and bugs in other drivers can be a great inspiration. Recently I was bored and went through pgjdbc and libpq CVEs, and fixed the ones that affected my driver. The most interesting was CVE-2026-134842, the part about SJIS: in simple query mode pgjdbc pastes parameters into the query, and with allowEncodingChanges=true and SJIS the yen sign is encoded as 0x5C, which Postgres reads as a backslash. So a parameter value could run as SQL. I don't paste parameters, but I found that I didn't check client_encoding at all, so the driver could write and read text incorrectly. Now I close the connection when the encoding changes. I also hadn't checked whether an error from Postgres was FATAL (more on this below).

Things I found in Postgres

First, date and time, the thing from my comment under the last post: kotlinx-datetime writes dates past year 9999 with a +, and Postgres doesn't accept it. Now I can say that thread is closed: Postgres 19 has this beautiful parenthesis in section 8.5.1: "(PostgreSQL does not support ISO 8601-optional signed years.)" I have no idea if other people would understand what that means :> What's interesting, jOOQ has a similar problem in MULTISET: a date like 10000-01-01 or infinity silently comes back as null.

Second, Postgres 18 changed the SQLSTATE for RESTRICT foreign keys from 23503 to 23001. This change wasn't in the release notes (now it is, because of my patch).

And lastly, sockets on Windows. The client can lose the FATAL message from Postgres: the backend exits without closing the socket gracefully, Windows sends RST instead of FIN like on Linux, and whatever the client hasn't read yet, FATAL included, is thrown away. I compiled my own Postgres to check an old fix for this (it was reverted in 2022, so no release has it).

Kotlin and Java ecosystem

The ecosystem is sewn up by giants: pgjdbc, Vert.x (with its own libraries) and R2DBC (which looks rather quiet). Even with AI usage I found only about 5 new projects with the Postgres wire protocol (maybe I just don't know how to use GitHub search :>). For one of the most popular languages and one of the most popular databases I think this is a low number. Even counting wrappers over libpq or sqlx, it's not much higher.

I don't understand why most people in Java and Kotlin don't want to write native SQL. Most database libraries are ORMs, DSLs, query builders and code generators. I don't see much benefit in that (not that I have a problem with code generation, my plugin for translations generates classes from JSONs), but Postgres with its custom types and operators isn't a great target: you end up with 2 versions of the same code or writing strings anyway, and at the end you debug the generated SQL, not the DSL.

I was also surprised that the libraries I looked at are not that different from JDBC in their general shape, and don't really use Kotlin's advantages over Java. For example, I use reified in get<T> to know if a column can be null. Maybe that's my prejudice, but I think many people still write Kotlin like Java, and no, changing if (variable != null) to variable?.let {} doesn't magically turn Java code into Kotlin code. Kotlin is enjoyable to write, with one limitation: type erasure. It is horrible, especially when passing arguments to the final fetch call as a map or a list. reified can't fix everything, and Valhalla doesn't look like it will help much.

AI, solo development

The wire protocol was easy, especially with AI. Worse was thinking about the API and how to connect all the mechanisms, and for that an application is a very good point to look from, because you see how you will use it. But in general writing is easy. Maintenance is hard. Fast progress at the beginning is fun, but it changes into fixing strange things, and AI doesn't make that much easier: AI (and people) tend to add code, and when you add code, you (and AI) have more context and more things to look at. In solo development (and without the most expensive AI plans) the key is cutting: code, KDocs, documentation, and questioning what AI writes. It is also a great way of learning.

Motivation matters, especially for a driver. Stars are not a great motivation: of those new wire protocol projects I saw only one still alive besides mine, pg-java. Mine was the application. And trying to keep the code readable and simple (not spaghetti and not lasagna) matters too. If it gets ugly, it starts to feel like work, where the code is always bad, and then you just don't want to keep working on it.

Writing a project in 2 weeks for a CV, going wide (different library, different stack), is easy. Maintaining something for yourself for 2 years and going deep, is not.

Repo: https://github.com/Octavius-Framework/octavius-postgresql


r/Kotlin • • 1h ago

FLX Lisp - Open Source Embeddable Lisp for Kotlin

Thumbnail github.com
2 Upvotes

Hi all.

I'd like to introduce my latest open source project FLX Lisp. FLX Lisp is a Lisp dialect implemented in pure Kotlin. Embed it in an Android app to script your app, let users write small programs, or explore Lisp interactively. The repository contains the FLX library and a demo app with an interactive REPL.

I have used FLX Lisp with my other open source Kotlin library called Kide (MVI & Clean Architecture) to build my free app Fuusio (productivity hub & digital toolkit): https://fuusio.org

I'd like to receive feedback about FLX Lisp. For instance, if there are any feature that you would like to be included, let me know.


r/Kotlin • • 1h ago

I built Appndroid Store: an open-source, iOS-inspired Android App Store with real-time Liquid Glass effects, multi-mirror downloads, and Shizuku/Root support

Thumbnail github.com
0 Upvotes

Hey everyone,

I just released v2.1.0 of Appndroid Store, a free and open-source (GPL-3.0) Android app store I've been building with Kotlin and Jetpack Compose.

I wanted an alternative store that doesn't feel clunky and brings multiple sources together in one place, with a Liquid Glass UI (plus Frosted and Solid modes for older devices or saving battery).

Main things in v2.1.0:

- Supports Play Store mirrors, F-Droid repos (Official, IzzyOnDroid, and custom URLs), and tracking apps directly from GitHub Releases

- Built-in Download Queue with pause/resume, concurrent download limits, and a floating active downloads indicator

- Standard, Shizuku, and Root install modes, plus version history and downgrade support

- Opens Play Store and market:// links directly

- Per-app ignore updates, auto-delete APKs after install, and JSON backup/restore

- Custom Liquid Glass switches, 120Hz sliders, and floating top notifications (blur and shaders turn off completely in Solid / Battery Saver mode)

No ads, no tracking, completely open source.

Would love to hear your feedback or any bugs you run into if you try it out.


r/Kotlin • • 1d ago

"Always rethrow CancellationException" quietly broke our withTimeout fallback in production

19 Upvotes

We added a rule across our shared KMP/Android modules to stop swallowing CancellationException inside generic catch (e: Exception) blocks. Standard hygiene, until network timeouts started aborting a whole sync job instead of hitting the fallback path.

Took a few traces to spot it: TimeoutCancellationException is a subclass of CancellationException. So a strict if (e is CancellationException) throw e guard treats a 2-second timeout identically to scope cancellation:

val delta = try {
    withTimeout(2_000) { api.fetchDelta() }
} catch (e: TimeoutCancellationException) {
    loadStaleCache() // must sit BEFORE CancellationException (and catches inner timeouts too)
} catch (e: CancellationException) {
    throw e
}

// Idiomatic fix: only THIS timeout returns null; parent cancellation still propagates
val safeDelta = withTimeoutOrNull(2_000) { api.fetchDelta() } ?: loadStaleCache()

Anyone else get bitten by CancellationException subclassing when cleaning up runCatching blocks? (I keep similar Kotlin concurrency notes in the repo pinned on u/yogirana5557.)


r/Kotlin • • 1d ago

QtJambi 6.12.1: Qt 6.12 for Kotlin and Java, with Android APK/AAB builds without Gradle

4 Upvotes

I maintain QtJambi, which makes the Qt framework (widgets, QML/Quick, multimedia, networking, SQL, 3D and much more) available on the JVM, for Kotlin as well as Java. Version 6.12.1 is out, with binaries for Qt 6.12.1 on JDK 11+ for Windows, macOS, Linux and Android, all on Maven Central (io.qtjambi:qtjambi:6.12.1). A minimal Kotlin app:

import io.qt.widgets.*
fun main(args: Array<String>) {
QApplication.initialize(args)
QMessageBox.information(null, "QtTest", "Hello World!")
QApplication.shutdown()
}

Some Kotlin specifics: the API carries nullness annotations, so Kotlin sees which arguments may be null, and QtJambi's UI compiler generates Kotlin code from Qt Designer .ui files (--generator=kotlin). What's new in 6.12.1:

  • Performance: simple calls into native code are 3–4× faster, calls from Qt into your overrides (events, event filters, item models) about a third faster, startup ~8% faster.
  • Android without Gradle: the QtJambi deployer builds signed APKs and Google Play App Bundles directly from your jars, packing only the Qt libraries, plugins and QML modules your app needs. Gradle builds (build.gradle.kts) are documented as well.
  • Native interop without JNA: QFunctionPointer calls C functions, and QFunctionPointer.of(...) turns a lambda into a native callback.
  • Leaner modules and many fixes. Release notes: https://github.com/OmixVisualization/qtjambi/releases/tag/v6.12.1 What's new in detail: https://github.com/OmixVisualization/qtjambi/blob/v6.12.1/www/Whats-New.md Happy to answer questions, and feedback is very welcome.

r/Kotlin • • 1d ago

kotpb-grpc: A pure-Kotlin replacement for protoc-gen-grpc-kotlin

4 Upvotes

Hey everyone!

I've been working on kotpb-grpc-codegen, a pure-Kotlin reimplementation of the official protoc-gen-grpc-kotlin compiler plugin.

The motivation was fairly simple: the official Kotlin gRPC generator doesn't seem to be evolving at the pace of the Protobuf ecosystem, and I wanted something that supports newer Protobuf versions while fixing some of the limitations of the existing generator.
Also protobuf and gRPC Kotlin generators were mere wrappers around Java generators, that means generating code 2 times, compiling java code in Kotlin projects which is slow and duplicated Classes and can cause problems.

As there is no support for the original generator, I decided to reimplement it while keeping compatibility with the existing grpc-kotlin-stub runtime to make it a drop-in replacement.

What's different?

A few improvements over the official generator:

  • No protoc-gen-grpc-java dependency: This is probably the biggest architectural difference. The generated Kotlin stubs are self-contained, and you only need protoc-gen-java for message classes. No intermediate Java gRPC code generation required.
  • Modern Protobuf support: Supports proto2, proto3, Protobuf Edition 2023 and Edition 2024.
  • Native binaries: Distributed as GraalVM native executables for Linux, macOS (Apple Silicon) and Windows. No JVM required to run the generator. Improving generation time for small proto packages, and simplifying the usage in polyglot codebases.
  • Better generated documentation: An optional comments flag preserves comments from .proto files as KDoc in generated Kotlin code.
  • Safer server implementations: An abstract_server_methods option makes RPC implementations abstract, so missing implementations become compile-time errors instead of silently returning UNIMPLEMENTED.
  • Lite runtime support: A lite option allows using grpc-protobuf-lite instead of the full grpc-protobuf dependency.
  • Better descriptor access: Service descriptors are accessible directly from the generated object, client stub and server implementation base.
  • Proper deprecation support: Protobuf service and RPC deprecation annotations are propagated to the corresponding generated Kotlin APIs.
  • More predictable TODO handling: Unimplemented methods using Kotlin's TODO() correctly result in gRPC UNIMPLEMENTED rather than UNKNOWN.

Compatibility

The goal is to make switching as painless as possible.

It uses the same protoc-gen-grpc-kotlin plugin interface and remains compatible with the existing io.grpc:grpc-kotlin-stub runtime. You don't need to migrate your client or server implementation to a different runtime.

It also includes end-to-end tests exercising unary, server-streaming, client-streaming and bidirectional streaming RPCs.

A note about AI

I want to be transparent: this project was developed with AI assistance.

I understand that AI-generated code can raise legitimate concerns, particularly around correctness and maintainability. However, this is a relatively small, focused compiler plugin with a clearly defined scope. Its output can be inspected, tested and validated, and the project includes unit tests and end-to-end interoperability tests.

I'm not asking anyone to blindly trust generated code. I'd rather have people review it, try it out and report issues.

GitHub: https://github.com/Kotpb/kotpb-grpc-codegen

I'd love to hear feedback from people using Kotlin gRPC.

Thanks!


r/Kotlin • • 2d ago

Koog is officially dead

53 Upvotes

r/Kotlin • • 2d ago

Compose Multiplatform turns 5. What have you built with it?

Post image
26 Upvotes

Hi! I’m Kate from the Kotlin team. Compose Multiplatform turns five this month.

Back in 2022, we were developing an iOS prototype for Compose Multiplatform in the open. We called its iOS source set uikitMain, but developers spotted the work before we’d announced it. One team had already used the prototype to build the official Droidcon app for iOS.

We’d love to see what you’ve built since then. Is there a screen, app, or experiment you’re proud of? Share a screenshot, demo, or repo link and tell us what you’re especially happy with.

If you used an AI coding agent along the way, we’re curious what it helped with and where you stepped in.


r/Kotlin • • 2d ago

Just saw the blog post about koog, and it made myself question the future of kotlin on the backend

22 Upvotes

(mainly for teams using ktor, because spring is maintained outside).
Jetbrains seems to be not that good currently, is it focusing on Kotlin only on mobile or is ktor and backend still a main focus? I also hear a lot of people going for rust on backend now (trendy nowadays), but in my team I still go for ktor for all the backend infrastructure and I don't want it to disappear and have the core true kotlin libraries disappear too (koog is one of them disappearing, going for a java alternative without coroutines and everything is a downgrade)
https://blog.jetbrains.com/kotlin/2026/12/what-spring-ai-agent-means-for-koog-users/


r/Kotlin • • 2d ago

Agents keep writing Java in Kotlin syntax

15 Upvotes

Our backend is Kotlin with Spring Boot, about 4 years old, and the team cares a lot about writing idiomatic Kotlin. Since agents started writing most new code, it increasingly reads like Java with the syntax swapped.

Things I keep seeing in agent PRs:

- !! everywhere instead of handling nulls
- mutable lists passed around where an immutable list or a sequence would do
- utility classes with a companion object full of static style functions instead of top level or extension functions
- data classes with var properties that get mutated later
- if (x != null) blocks where ?.let or an early return would be cleaner

coderabbit flags the !! cases and some nullability problems, which helps. But "this whole class is Java style" isn't something a review comment fixes, and our juniors learn from what gets merged.

What we've tried: a Kotlin style section in the agent instructions with examples, and detekt with a stricter config in CI. Detekt catches maybe a third of it.

For Kotlin teams: how do you get agents to write idiomatic Kotlin? Better instructions, stricter detekt rules, or just more review?


r/Kotlin • • 2d ago

Any good resources to learn coroutines?

3 Upvotes

Hi

I am working on a new project at work that has backend services written Kotlin. I specifically have to understand Kotlin coroutines and debug them.

I have previously worked with Java threads so I have familiarity with JVM.

Any good resources and a strategy to get up to speed with Kotlin and its coroutine debugging?


r/Kotlin • • 1d ago

inherited an undocumented 6-year-old Kotlin/Gradle service: timed a 45-minute legacy bug-fix using read-only Ask Mode (including the 12-minute dead end)

0 Upvotes

now inherited all the maintenance on a 6-year-old Kotlin/Gradle billing service whose last original author left in 2023. Almost zero README, three generations of coroutine wrappers, and a production bug where partial refunds occasionally dropped an idempotency key on retry, and instead of grepping manually for half a day or letting an agent loose to refactor the package, I set a 45-minute timer to see how much of the investigation and characterization testing an IDE-integrated coding agent could actually carry safely. Here is the unvarnished log, including two snags that burned time

from 00:00 to 00:06, I hit a self-inflicted "wrong door" setup snag and wasted 4 minutes. Out of habit I opened the JetBrains plugin marketplace and installed the standalone Junie plugin, which opened a separate tool window next to the main AI sidebar and made it look like two competing tools. Checking the docs cleared it up: Junie is one agent engine across five surfaces (IDE AI Chat, standalone CLI, ACP clients, GitHub Actions, GitLab CI), and the recommended IDE entry point is just opening the built-in AI Chat panel and selecting Junie from the agent dropdown with no extra plugin install. Slightly confusing transition if you have not tracked recent JetBrains IDE updates.

tried to summarize it into a brief table

from 00:06 to 00:19, read-only Ask Mode was a genuine time-saver. I locked the agent strictly to Ask Mode (zero disk writes) and had it trace every caller touching `RefundRetryProcessor` and write up a short call map. Because it uses the IDE's project index rather than brute-force text grepping, it traced cross-module interfaces and coroutine dispatchers cleanly in about 11 minutes and produced an architecture note that honestly saved like around 90 minutes of manual `Find Usages` hopping, then from 00:19 to 00:31, I hit a 12-minute dead end caused by a classic static-analysis blind spot. Reading only the repo code, the agent pointed confidently at an older fallback branch in `RetryPolicy.kt` as the bug source. I spent 12 minutes tracing that path before pulling staging logs and realizing a runtime feature flag toggled in a separate config repository completely bypassed that branch in production. Static code agents (IDE-integrated or CLI) simply cannot see external runtime flags or live telemetry unless you paste the logs in. so from 00:31 to 00:45, once staging logs pointed to the real retry path, I had the agent write a failing JUnit characterization test reproducing the dropped idempotency key before switching out of Ask Mode into execution. The final patch was an 18-line diff across two files, verified against the new test and IntelliJ's native compiler inspections with zero collateral reformatting.

main takeaway from 45 minutes on a legacy Kotlin codebase: read-only mapping plus a failing characterization test before allowing file writes is the only way coding agents feel safe on old JVM repos, and you still have to verify static call graphs against live logs;

now would like to ask you guys maintaining older Kotlin/JVM services, what workflow has actually held up for fixing bugs in legacy codebases with AI agents? Are you doing read-only exploration first, CLI agents with tests, or still mostly manual `Find Usages` and debugger breakpoints?


r/Kotlin • • 2d ago

Is it worth to learn Kotlin in 2027?

Post image
14 Upvotes

I am 17 years old and I am currently in bca 1st year and recently started learning kotlin to become an android developer. But as this is Ai era is learning any language worth? Or do I need something else?


r/Kotlin • • 2d ago

I built a Gradle plugin to detect adaptive UI issues in Jetpack Compose and XML. Looking for feedback.

Post image
0 Upvotes

I've been working on a side project called ViewLint, and the latest 2.0.0 release is now published.

The motivation came from a recurring problem: Android UI code can look perfectly fine on a phone but behave very differently when the available window size changes.

I wanted to see how much of that could be identified through static analysis.

ViewLint currently analyzes both Compose and traditional XML layouts.

Some examples of what it checks:

  • Missing or insufficient WindowSizeClass handling.
  • Hardcoded dimensions and potentially rigid layouts.
  • Missing tablet-specific XML layout variants.
  • Orientation restrictions and Android 16+ resizability risks.
  • Suspicious Compose modifier combinations.

I also wanted the output to be useful beyond just showing warnings, so it supports:

  • HTML reports for developers.
  • JSON reports for automation.
  • SARIF reports for GitHub code scanning.
  • Baselines to avoid blocking existing projects over legacy findings.

I tested it against a few public Android repositories:

  • Now in Android: 100/100
  • NewPipe: 95/100
  • Mihon: 60/100

These scores are from ViewLint's adaptive UI analysis, not overall code quality.

I'm particularly interested in feedback from developers working with Compose.

A few things I'd like to understand:

  • How do you approach adaptive layouts in Compose?
  • Do you use WindowSizeClass consistently, or prefer your own window-size abstractions?
  • What kinds of static checks would actually be useful during development?
  • Where do you think static analysis becomes insufficient and runtime testing is necessary?

Repository: https://github.com/dev-vikas-soni/viewlint

Plugin Portal: https://plugins.gradle.org/plugin/io.github.dev-vikas-soni.viewlint

This is an actively evolving project, so critical feedback is welcome.


r/Kotlin • • 3d ago

Yet another kotlin lsp written in Rust

6 Upvotes

TL;DR: A new, full-featured and lightweight Kotlin language server, written in Rust.

Site: https://bash-spbu.github.io/kotlin-analyzer/
GitHub: https://github.com/bash-spbu/kotlin-analyzer

Pros:

  • Feature-rich: nearly all of LSP 3.18 that applies to Kotlin (hierarchies, inlay hints, semantic tokens, code lenses, organize imports…), plus its own debugger, decompiler, ktfmt-compatible formatter and an MCP server for AI agents.
  • Fast and light: one native binary, no JVM of its own. Hover and go-to-definition answer in ~0.1 ms (p50), edits get fresh diagnostics in ~2 ms; ktor's 2,300 files load in 2.6 s and take ~200 MB. Library indexes are kept on disk.
  • Built the rust-analyzer way: incremental, query-based (Salsa), with a typed syntax tree and per-module name resolution.
  • Runs where you work: macOS, Linux and Windows; VS Code, Neovim, Helix, Zed and Claude Code extensions, plus any LSP client; Gradle and Maven; Kotlin/JVM, Android and Multiplatform.
  • Open and AI-extensible: Apache-2.0, with a spec of every feature and agent docs, so your agent can add what your project needs.

Cons:

  • Diagnostics report only what the analysis is sure of. You won't get every compiler error, as with JetBrains' kotlin-lsp.
  • Daily use has mostly been Zed on macOS with large Gradle Spring Boot projects. Android and KMP are benchmarked on nowinandroid, ktor and kotlinconf-app. Windows and Maven support is new in 1.3.0 and not yet battle-tested; Kotlin/JS, Wasm and Native libraries aren't read yet.

If you try it and hit a bug or a missing feature, please open an issue with a public project and a file/line that shows it. We'd really appreciate it!

A note on AI: most of the code was written by an AI coding agent (Claude Code), directed and reviewed by us. Every feature is specified first in docs/spec/, every change comes with fixture tests that fail without it, and diagnostics are checked at zero false errors on eight large closed-source Spring Boot projects. That same setup is what makes it easy for your own agent to extend.


r/Kotlin • • 4d ago

Value classes in Kotlin 2.5.0 and beyond

Thumbnail blog.jetbrains.com
89 Upvotes

r/Kotlin • • 3d ago

Built a cross-platform desktop music player (Music0) using Compose Multiplatform + Material 3 Expressive UI — looking for feedback

Thumbnail gallery
3 Upvotes

Repo: [https://github.com/ARYAN007H/Music0](https://github.com/ARYAN007H/Music0)

Most desktop music clients today are either sluggish web wrappers eating 1GB of RAM or utilitarian local players stuck in 2012. I built Music0 (v1.0.3-cmp) to see how far I could push a tactile, Material 3 Expressive interface on desktop while keeping it fast and native.

What’s actually in it:

  • Material 3 Expressive UI: Scalloped artist avatars, a wavy playback scrubber, floating pill controls, and dynamic tonal surfaces.
  • 5 Custom Palettes & Backdrops: Switch between Nebula, Ocean, Ember, Forest, and Mono themes, plus customizable Now Playing lyrics backdrops (Fluid, Glow, Aurora, Rain, Dark).
  • Smart Discovery & Radio: Dedicated mood/station grids, auto-generated smart mixes (Daily Discovery, Late Night Drift, On Repeat), and a "For Your Taste" carousel.
  • Offline & Quality Controls: Built-in offline downloads and configurable streaming quality up to Lossless.

It’s completely open source. I’d genuinely appreciate ruthless feedback on the UI/UX, performance, or any edge cases you break. If you like where it’s headed, a star on GitHub helps a ton!


r/Kotlin • • 4d ago

Nucleus 3.0 is out !

Thumbnail nucleusframework.dev
34 Upvotes

Hello everyone,
I’m pleased to announce the release of Nucleus 3.0.
A lot of ground has been covered since 2.5: more than 1,100 commits and 225 merged pull requests went into this release.
Stability was a major focus of this cycle. Hundreds of fixes went in, across rendering, windows, input, packaging and updates on all three platforms. Nucleus 3.0 is by far the most solid version we have shipped.
This release also brings many new capabilities: video and audio playback, widgets, biometric authentication with Face ID, Touch ID and Windows Hello, and direct publishing to the Microsoft Store, the Mac App Store and Flathub, all from Kotlin.
It’s also great to see Nucleus being adopted by more and more projects, such as Spotube, Tasks.org, AB Download Manager, Keyguard and SimpMusic.
The documentation is available at https://nucleusframework.dev/en/docs/
Your feedback is very welcome, whether it’s about what you build with it or any issues you run into.


r/Kotlin • • 3d ago

Compose Multiplatform App Wizard

Thumbnail gallery
7 Upvotes

https://terrakok.github.io/Compose-Multiplatform-Wizard/
Updated CMP Wizard!

  • Compose Multiplatform 1.13.0 — AppCDS/AOT for faster desktop app startup
  • Kotlin 2.5.0 — Kotlin/Wasm is now Stable; Swift Export is in Beta with a new DSL
  • Material3 1.13.0 — now stable
  • Navigation3 1.2.0 — Result API for passing results between screens; multiplatform Deep Link API
  • Metro 1.6.1 — much faster compilation of DI graph extensions
  • Gradle 9.9.3 — incremental compilation of Kotlin DSL scripts

r/Kotlin • • 3d ago

Fana Cumik: Open-source manga and webtoon reader sharing one Compose Multiplatform UI across Android, Desktop JVM, and WasmJs

Thumbnail gallery
0 Upvotes

I wanted to see how much of a media-heavy reader could run out of shared/ before platform differences forced separate UI layers. In Fana Cumik (v1.0.1), every screen from catalog search to reading history runs from one Compose Multiplatform codebase across Android, Desktop JVM, and WebAssembly (wasmJs), leaving only network engines, storage, window insets, and region tile decoders behind expect/actual contracts.

Two engineering problems shaped the codebase:

  • Blurry 16,000 px webtoon strips: Standard decoders cap vertical texture heights, which shrinks a 900 px wide strip proportionally and stretches it back up into muddy dialogue. Fana Cumik fetches encoded bytes into a bounded disk cache, then slices tall strips into 2048 px vertical ImageBitmap tiles using BitmapRegionDecoder on Android and off-screen Skia Surface drawing (SamplingMode.MITCHELL) on Desktop and Web. Removing per-item aspect-ratio wrappers keeps the tiles flush with zero hairline gaps.
  • Duplicate image requests during fast scrolling: ReaderImageController owns all page requests keyed by (url, targetWidth, targetHeight) and caps concurrency at 2 running jobs (at most 1 speculative preload). Scrolling a preloaded page into view promotes the in-flight job instead of firing a second HTTP GET.

Other technical details in v1.0.1:

  • Fractional webtoon scroll offsets and paged indices save to a single serialized SQLite connection (Dispatchers.IO.limitedParallelism(1)) on Android and Desktop, or localStorage on Web, every 2s and after 750ms of settle.
  • Global history compacts rows in SQL via ROW_NUMBER() OVER (PARTITION BY source_id, manga_id ...) so binge-reading does not flood the recent list while manga details keep per-chapter resume states.
  • Web deployment pairs wasmJs assets on Cloudflare Pages with two Functions to handle API proxying and upstream CDN CORS headers.
  • R8 shrinking keeps the signed Android release APK at 7.5 MB (AAB at 8.4 MB), alongside a 49.3 MB Desktop JAR and an 80.2 MB Linux x64 jpackage bundle.

Links:

If anyone here is shipping wasmJs or heavy image lists in Compose Multiplatform, I would appreciate feedback on the architecture and browser performance.


r/Kotlin • • 4d ago

I built and published a Jetpack Compose library for rendering streaming Markdown from Kotlin Flows

Thumbnail gallery
1 Upvotes

r/Kotlin • • 5d ago

Advent of Code Project Template

6 Upvotes

Last year I tried solving (most of) the advent of code challenges in Kotlin Notebook https://www.reddit.com/r/Kotlin/comments/1pe252t/solving_advent_of_code_in_notebooks/ but since they sadly have been sunset, this year I created (read "collaborated with AI") a template repo for you to get started. It has some cool functions I missed from %use adventOfCode in notebooks like submitting answers, waiting for the next day to release, etc.

Let me know if you have any improvements (or make a PR :p)

https://github.com/Jolanrensen/advent-of-code

(P.S. Seb is also doing livestreams again this year! :D https://www.youtube.com/watch?v=Z2kajEnLf3k&list=PLaREJ9wqJKLI )


r/Kotlin • • 5d ago

How JPA Defaults Broke Our Kotlin Microservice

Thumbnail shiftmag.dev
9 Upvotes

r/Kotlin • • 5d ago

Stream-Source: Virtual-Thread Friendly Data Streaming

Thumbnail reddit.com
1 Upvotes