r/Kotlin

I got tired of AI agents breaking my Compose code, so I built a skill kit to fix that
▲ 23 r/Kotlin+2 crossposts

I got tired of AI agents breaking my Compose code, so I built a skill kit to fix that

Every agent writes the same broken patterns:

  • _state.value = instead of _state.update { }
  • collectAsState() instead of collectAsStateWithLifecycle()
  • GlobalScope.launch { } in ViewModels
  • LazyColumn with no keys
  • Hardcoded strings, deprecated nav routes

Built a markdown skill kit that drops into .cursor/skills/ or ~/.claude/skills/ and enforces strict MVI before the agent writes a single line.

13 reference modules. 27 agent install guides. CI-validated on every push.

Repo: https://github.com/haidrrrry/compose-kotlin-agent-skills

git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .cursor/skills/compose-kotlin-agent-skills

MIT. What broken patterns has your agent introduced? I'll add them to the banned list.

u/DueAnt8779 — 23 hours ago
▲ 1 r/Kotlin+1 crossposts

Hi, I'm newbie trying to publish my first App

Hey everyone,

I’m a junior developer trying to grow my portfolio and I recently published a small Android app called RideForecast to the Google Play internal testing track.

The app is simple, lightweight, and still early in development, but I need testers willing to install and keep it installed/use it over the next 14 days so I can meet Google Play testing requirements and continue improving the project.

This is honestly part of me trying to build real-world projects and strengthen my portfolio instead of just tutorial work. Having an actual Play Store app means a lot for entry-level opportunities, I think.

You don’t need to do anything complicated:

- Install the app through the testing link

- Open/use it occasionally over the 14-day period

- Optional feedback is appreciated

If anyone is willing to help, I’d genuinely appreciate it. I can send the testing link once you comment or DM me your Gmail address for the tester list.

Thanks.

reddit.com
u/Indianathe — 2 days ago
▲ 1 r/Kotlin

Help me guys, I’m a final-year CS student building a productivity app, would love honest feedback

Hey everyone,

I’m a 21-year-old final-year Computer Science student, and I’ve been working on a small app called ProdZen with Kotlin + Compose.

It’s currently in early access / open testing, and I’d be really grateful if some of you could try it out and share honest feedback.

The idea behind ProdZen is simple: I wanted to build something that helps people understand their screen time, stay focused, and reduce impulsive app-opening without feeling too strict or guilt-based.

Right now, it includes things like:

* Screen time tracking and app usage insights

* Focus modes for study/work/creative sessions

* Mindful breathing pauses before opening distracting apps

* App limits and focus-based blocking

* A privacy-first approach where the app is meant to help, not track you unnecessarily

I know the app is still not perfect, and that’s exactly why I’m posting here. I’d love feedback on:

* Is the app actually useful?

* Is the onboarding clear?

* Are there any bugs or confusing parts?

* What features should I improve or remove?

* How should I market this better as a student founder?

* What would make you recommend it to a friend?

Even if you don’t install it, feedback on the idea, positioning, screenshots, or Play Store description would mean a lot.

Thanks in advance. I’m still learning, so please be honest but kind :)

reddit.com
u/HeadWoodpecker5237 — 3 days ago
▲ 21 r/Kotlin+2 crossposts

"Some" : A Library for generating dummy objects for testing

Hey everyone!

I wanted to share a library I recently built to reduce boilerplate when writing tests.

I was getting really tired of hand-crafting massive dummy objects, breaking test isolation with shared instances, and having dozens of tests fail to compile just because I added a single field to a data class. I used tools like kotlinfixture and Kotest Arbs for a while, but I wanted something that was 100% pure Kotlin under the hood to perfectly handle things like Sealed Interfaces.

So, I built Some. It’s a Kotlin JVM library that instantly generates fully populated test instances without any setup. You just call:

val testObject = some<MyClass>()

...and it handles the rest (including deeply nested structures and recursive sealed classes).

I just published it on GitHub and also blog post about why I built it and how it works. I'd love for you to check it out and hear any feedback!

💻 GitHub: https://github.com/MessiasLima/Some
📖 Docs: https://some.appoutlet.dev/
📣 Blog post:  https://blog.appoutlet.dev/some-a-library-to-generate-dummy-objects-for-unit-testing-in-kotlin/

github.com
u/messiaslima — 3 days ago
▲ 18 r/Kotlin

KotlinConf 2026 – Join Us Live!

KotlinConf is happening this week in Munich!

From May 20–22, over 2,000 Kotlin developers will gather for three days of talks, announcements, and community.

Join us live online: https://jb.gg/cim52r

u/daria-voronina — 4 days ago
▲ 5 r/Kotlin+2 crossposts

How to learn Kotlin

Guys I am newbee , i have done DSA in Java , i have intermediate knowledge of web dev , know during my summer break I am thinking to learn android development and for that I wish to start with Kotlin, please if someone is experienced can u suggest me a beginner Friendly course with a good tutor .. i was thinking to go for chai aur code - mobile dev but I didn't find that on tg 🫠, please suggest me a good course x😭🥺

reddit.com
u/Successful_Candy6932 — 5 days ago
▲ 17 r/Kotlin+1 crossposts

Backdrop-blur library for Compose Multiplatform with an auto-tier that no-ops on low-RAM devices instead of OOMing. Looking for API feedback.

Hi all, I just open-sourced liquid-glass, a small Compose Multiplatform library for iOS 26-style frosted backdrop blur. Sharing here because the API design choice I made is the part I'd most like feedback on.

The problem: Compose's Modifier.blur blurs a composable's own content, not the backdrop. Chris Banes's haze library handles the backdrop-blur case cleanly. What I wanted on top of that was graceful degradation on memory-constrained devices, because the iOS 26 effect chews through GPU memory on a 2GB Android 11 device.

The approach: three explicit quality tiers, auto-picked per platform.

- Full on Android 12+ (non-low-RAM) and iOS 17+: 24dp blur, 1.4x saturation, full-res backdrop layer.

- Medium on iOS 15-16: 16dp blur, 0.5x downsampled backdrop.

- Fallback on Android < 12, isLowRamDevice, or iOS < 15: zero offscreen buffers, no blur, flat tint with edge sheen.

The Fallback tier allocates zero GraphicsLayers. The same code that draws frosted glass on a Pixel 9 quietly draws a tint on a 2GB device with no OOM, and no per-call-site branching.

API surface: rememberLiquidGlassState() + Modifier.liquidGlassSource() + Modifier.liquidGlass() / GlassCard / GlassButton / GlassNavBar.

What I'd like feedback on:

  1. Is the platform auto-detection sensible, or should the tier always be explicit at the call site?

  2. Are Full / Medium / Fallback the right names, or should they be capability-named (e.g., FullBlur / DownsampledBlur / FlatTint)?

  3. Anything obviously missing from the API for KMP backdrop-blur use cases?

Apache 2.0, on Maven Central as 0.1.0. Repo: https://github.com/NadeemIqbal/liquid-glass

u/DistributionOk9460 — 4 days ago
▲ 12 r/Kotlin

I built a small JVM finite-state-machine library with Kotlin/Java code generation from a visual editor

Hi r/Kotlin,

I’ve been working on a small finite-state-machine library for the JVM:

https://github.com/NGirchev/fsm

The original goal was simple: I often have domain objects with a `status` / `state` field, and I want transitions to be explicit instead of scattered across services as `if/when` blocks.

The library supports:

- Kotlin-first FSM builder API

- domain FSMs that apply transitions to an existing object

- guards / conditional transitions

- actions and timeouts

- Mermaid and PlantUML diagram generation

- Java usage as well, since it is a JVM library

Recently I also tried an experiment: I built a visual FSM editor for this library almost as a one-shot implementation using Codex CLI with GPT-5.5. I only tested it lightly so far, but code generation already works for both Kotlin and Java.

I’m curious whether this direction feels useful to Kotlin/JVM developers, or whether you’d rather keep FSM definitions purely in code.

https://i.redd.it/1nuyld9tgq1h1.gif

reddit.com
u/Intelligent_Path_878 — 5 days ago
▲ 4 r/Kotlin+2 crossposts

Building a Lightweight Native Radio App for Android Automotive OS

https://preview.redd.it/h2uc9rzbto1h1.jpg?width=1280&format=pjpg&auto=webp&s=b36a8877cfcb8c5eb0815f65e189ba2525fcfa4c

Built a lightweight AAOS radio app because most automotive radio apps felt bloated, outdated, or simply not designed for actual driving.

https://youtu.be/NjkMVrde7Is

So I made bradio.app — a native Android Automotive OS radio app focused on:

  • fast launch
  • low distraction UX
  • privacy
  • reliability
  • native AAOS behavior

Current version:

  • 100+ stations across Estonia, Latvia, Lithuania, Poland, and Ukraine
  • ~150 streams total
  • background playback
  • steering wheel controls
  • voice search
  • Now Playing metadata (~97% metadata coverage)
  • favourites + recents
  • offline station catalogue cache
  • no ads
  • no accounts
  • no analytics SDKs
  • no Google Play Services dependency

A few things I intentionally didn’t add:

  • no sleep timer
  • no EQ
  • no endless settings
  • no webview-style UI
  • no deep menu trees

The whole APK stays under 10 MB because AAOS hardware fragmentation is still very real.

Some AAOS-specific choices:

  • Search + Settings locked while driving
  • High-contrast dark-only UI
  • Pure MediaBrowser / Media3-based media stack
  • Home screen media card integration
  • Custom Now Playing favourite actions
  • Physical steering wheel button support

The app is currently distributed through:

  • Google Play for Cars
  • Harman Ready Link
  • Appning by FORVIA

Distribution itself is global, but actual availability can vary depending on OEM integrations, regional storefronts, certification status, and vehicle platform decisions.

It also recently passed Harman Ignite Automotive APK validation with zero NOK findings.

What I’ve learned building for AAOS:

  • simplicity matters more than feature count
  • stability matters more than architectural purity
  • many existing automotive apps are still designed like old desktop media browsers
  • AAOS rewards apps that respect driver attention

I’m currently restructuring the internal architecture before eventually doing a full Media3 session migration, but trying very hard not to turn the app into another overengineered media platform.

Curious what other AAOS developers here think:
What are the biggest mistakes you see in current automotive media apps?

Also happy to answer technical questions about MediaBrowser compatibility, validator requirements, distraction optimization, OEM distribution, or AAOS UX constraints.

I’ve also been publishing some AAOS and other platform architecture notes, validator reports, and development writeups on bradio.dev for anyone interested in the engineering side of automotive Android apps.

https://preview.redd.it/61zejswdto1h1.jpg?width=1280&format=pjpg&auto=webp&s=6e5a810ad8f2015d2a41bb7f66790d84364ad7f7

https://preview.redd.it/9nh7vqwdto1h1.jpg?width=1280&format=pjpg&auto=webp&s=4ca1d1614d3caa01ade103bfffa598c5a89e8b13

https://preview.redd.it/8v6o7rwdto1h1.jpg?width=1280&format=pjpg&auto=webp&s=0d9d325b10018d30f255c3e60156e74c19c439cf

https://preview.redd.it/91eb1qwdto1h1.jpg?width=1280&format=pjpg&auto=webp&s=16ad3e44f533650baced94d1c3e50a5d5aa80c2e

reddit.com
u/xyxyu — 5 days ago
▲ 0 r/Kotlin+1 crossposts

Хочу написать Java бот который превращает видео в гифку 512 на 512 и тд Хочу написать Java бот который превращает видео в гифку 512 на 512 и тд

Хочу написать Java бот в телеграм который превращает видео в гифку 512 на 512 и тд

Chat gpt для подсказки можно использовать

Пока что самый лучший Gpt чат

Хочу написать Java бот в телеграм который превращает видео в гифку 512 на 512 и тд

Для телеграмма бота

Сайт пока что создавать не хочу так как содержание норм домена затратно

reddit.com
u/Safe_Tumbleweed_9484 — 7 days ago
▲ 0 r/Kotlin

🧑‍💻 Kotlin and integer divisions

In elementary school, I learned Euclidean division:

  • 7 ÷ 3 = 2, remainder 1
  • -7 ÷ 3 = -3, remainder 2

The remainder is always positive and smaller than the divisor.

So when I started using Kotlin, I expected integer division to behave the same way.

But:

println(-7 / 3) // -2
println(-7 % 3) // -1

Kotlin follows truncating division inherited from the JVM, not Euclidean division.

That means:

a = (a / b) * b + (a % b)

still holds, but the remainder can be negative.

This surprised me because Euclidean division is usually what people first learn in mathematics.

We're currently exploring this topic while working on Kotools Types, especially around safer and more predictable integer APIs for Kotlin Multiplatform.

I’m curious:

  • Did this behavior surprise you too?
  • Do you prefer truncating division or Euclidean division in programming languages?
  • Should Kotlin expose Euclidean operators in the standard library?
u/lvmvrquxl — 7 days ago
▲ 3 r/Kotlin+1 crossposts

Large mixed projects

I currently have 3 completely separate IntelliJ projects: Kotlin project, Dart Project and React/TypeScript project. All 3 projects sit inside of a sinlge git repo:

Git Root

Kotlin Project

  • Kotlin module 1
  • Kotlin module 2
  • Kotlin module 3

Dart Project

  • Dart module 1
  • Dart module 2
  • Dart module 3

React/Typescript Project

I was thinking of combining them into one large IntelliJ project, that sits at the git root.

I was wondering how others organize a project like this?

reddit.com
u/StokeMasterJack — 7 days ago
▲ 8 r/Kotlin+6 crossposts

I really liked KMP, Koog, and the idea of Client-Side MAS. This is the future!

The industry is currently burning billions on server GPUs, and the trend of moving computations to the Edge (end devices) has already started. Apple Intelligence and local NPUs in Android flagships are just the beginning.

Privacy by Design: For projects involving personal data, privacy is critical. Running everything through server cloud systems is a cost of today's technologies, while doing it through local LLMs and MAS is a killer feature. The data does not leave the device!

Native Concurrency: Python suffers from the GIL and workarounds in asynchrony. In KMP, we get native Coroutines and Flow. Agents in Koog are simply lightweight coroutines that communicate via channels without blocking the app's UI thread. This is elegant and mathematically rigorous.

KMP + Koog is the ideal foundation for Client-Side MAS. Python dominates in AI only because of its historically established ecosystem of mathematical libraries. But for orchestrating agents on the device, it is terrible.

But at the moment, we are hostages to the current stage of technological development and popular trends(

reddit.com
u/vladlerkin — 7 days ago
▲ 7 r/Kotlin+1 crossposts

Switching Java versions on Windows is a real hassle, so I built a CLI to make it fast and seamless.

jir

Language: English | 中文

jir helps you manage Java versions without fighting JAVA_HOME.

Install a JDK, switch to it, and keep your active Java runtime behind one stable path: home/occupy.

Why

If you often switch between Java 8, 17, 21, or different vendors like Temurin, Corretto, Zulu, Oracle, and Microsoft OpenJDK, jir keeps that workflow simple.

You can set JAVA_HOME to home/occupy once. After that, jir use 21:temurin switches Java without editing environment variables again.

On Windows, switching uses a directory junction, so it is fast and does not copy the whole JDK.

Install

Download or build the Windows GUI installer:

dist/jir-0.1.0-windows-x64-gui-setup.exe

The installer lets you choose where jir lives. It can also add jir to PATH and set JAVA_HOME for you.

After installing, open a new terminal and check:

jir -h

Quick Start

See what you can install:

jir ls -i

Install Java 21. If there are multiple vendors, jir will let you choose one:

jir i 21

Already know what you want?

jir i 21:temurin

Switch to it:

jir use 21:temurin

Check what is active:

jir current

Remove something you no longer need:

jir uni 21:temurin

Commands

  • jir, jir -h, jir -help, jir --help: show help.
  • jir ls: show installed JDKs.
  • jir ls -i: show installable JDKs.
  • jir i 21: install Java 21 and choose a vendor.
  • jir i 21:temurin: install a specific distro.
  • jir use 21: choose an installed Java 21 distro and activate it.
  • jir use 21:temurin: activate a specific installed distro.
  • jir current: show the active Java runtime.
  • jir uni 21:temurin: uninstall a JDK after confirmation.
github.com
u/Playful_Call_9219 — 7 days ago