We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Migrating from Autovalue to Kotlin Data Classes

Formale Metadaten

Titel
Migrating from Autovalue to Kotlin Data Classes
Serientitel
Anzahl der Teile
90
Autor
Lizenz
CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
Languages Talk, Intermediate AutoValue is a powerful tool provided by Google to generate Java immutable value classes. If you are migrating your project to Kotlin, data classes are the most direct way to replace it while keeping the same features. There are however trade-offs to take into account. In this talk we will introduce how we migrated our project from AutoValue to Kotlin data classes and how we dealt with the issues we encountered along the way. We will also discuss the advantages and disadvantages of each approach in terms of build time, apk size, method count and serialization time. After this introduction, we will deep dive into two topics: First, we will look into different serialization strategies available and how they perform. We will look into Gson, Moshi and Kotlinx.serialization libraries and explore their trade-offs when choosing one. Second, we will explain how we built an IntelliJ/Android Studio plugin to help us automate the conversion from AutoValue to Kotlin Data Classes. We will explain how plugins work and how you can also develop one to help automate repetitive IDE-related tasks.