O U R S P O N S O R S
March 12th, 2024
Kotlin Multiplatform: Building Production-Ready Applications with Confidence
Porting Google's Java Logging Framework to Kotlin Multiplatform
VIE
Sponsors
2
VIE
Housekeeping
3
VIE
News
4
VIE
Community Interview
VIE
1 Volunteer
7 easy Questions
Your favourite topic
In German or English
6
VIE
Community Interview
Who are you in one sentence?
How long have you been working with Kotlin?
What are you working on (in Kotlin)?
How is Kotlin used in this project?
Tell us about a Kotlin win.
Tell us about a Kotlin fail.
Any problems/wins using Java Libraries?
Kotlin Frameworks / Features:
7
VIE
Upcoming Schedule 2024
April: Java Vienna: "Deep dive into Hibernate� ORM 6.4 features" + TBA 8th April
April: Kotlin Vienna: Meet up @ Sentry.io 23rd April
May: Java Vienna Meetup - Venkat Edition! 6th May
May: KotlinConf 2024 Global Watchparty 23rd May� with Kotlin Vienna
8
VIE
Contact us
If you have any questions or want to get in touch with us, you are more than welcome to do so!
Our contact information:
meetup@kotlin.wien
9
VIE
Welcome @ Meister
Kotlin Vienna
Meister
Tools that Work for You
MindMeister
It all starts with an idea.
MeisterTask
Your Team. Aligned.
MeisterNote
Write Here. Write Now.
Tech
Write Here. Write Now.
KMP: Building Production-Ready Application with Confidence
Agenda
Introduction
KMP overview
KMP at Meister
Tips & Tools
Introduction
Arcadii Rubailo
Kotlin Multiplatform overview
Refresh KMP knowledge
KMP quiz
A simple way to stress people
KMP at Meister
A new technology for a new product
MeisterTask Notes
Your Projects Need Documentation
Notes to Mobile
It is alive live!
What is shared
Native vs common
How it is shared
Artifacts distribution flow
Tips & Tools
Boost your confidence
Testing!
Why is it especially important for KMP?
Testing!
Kover
Testing!
Platform-specific tests
API validation
Monitor changes to your public API
API validation
Monitor changes to your public API
API validation
Monitor changes to your public API
Publishing
What? Where? How?
Publishing
What? Where? How?
Publishing
Maven vs Package.swift
Swift golden hammer
SKIE - Swift Kotlin Interface Enhancer
Generates Swift enum wrappers for both Kotlin enums and sealed classes
Allows to create interface extensions
Supports only Flow to AsyncSequence interoperability
Requires an update to support a new Kotlin version
Q&A
Any Questions?
Giancarlo Buenaflor (Gino)
Porting Google’s Java Logging Framework to Kotlin Multiplatform
(New Grad) Software Engineer @ Sentry
Google Summer of Code 2023
20K+ Contributors
850+ Open Source Organizations
Including Kotlin Foundation - but I need a proposal first
Working on a Google specific project?
Just read the Kotlin slack channel :D
Proposal accepted
Google & Jetbrains engineers as mentors
Several Google teams were showing interest for this project
What is Flogger?
Main logging framework for Java/Kotlin projects within Google
Less bytecode generated
Read more here: https://google.github.io/flogger/
What’s expected
Flogger -> KFlogger
Usable with Kotlin Multiplatform for mainly iOS and JVM
Implement basic logging functionality
Keep original Java Flogger codebase
Bazel / Blaze
Why Bazel? Because Google uses it
No idea how it’s supposed to work with KMP
Let’s just use Gradle -> great! but wait… Flogger uses Bazel so I need to compile Flogger in Gradle first
Porting Blaze to Gradle
Actually straightforward if you understand it
What dependency versions are used?
expect/actual typealias
typealias: provide alternative names for existing types
Cons:
Pros:
kotlinx-datetime
JVM:
Common:
kotlinx-serialization
JVM:
Common:
Just ignore the errors!
KFlogger
JVM:
Common:
Caveats
Testing typealiases
Test for runtime errors
How to typealias Java’s Class?
Java Flogger
Using KClass directly won’t work
Klass
Common
iOS
JVM
iOS implementation
Testing with Truth / Kruth
Truth is Google’s testing framework for Java/Kotlin projects
Kruth -> KMP version
Only dev builds available
What about compatibility?
What about compatibility?
Google’s current solution: write manual tests
KFlogger usage
Internal politics
Flogger Team is very passionate about the framework
.. and they disliked the KFlogger project
gave quite some pushback
Completion
Only an experimental project
Thanks!
Feel free to ask questions!