Aaron He's blog
  • Home
  • Twitter
  • GitHub
Subscribe

Kotlin

A collection of 3 posts
Android

Moshi Kotlin Gotchas

Moshi 1.5 added @Json annotation support for Kotlin classes. It's a great addition for Kotlin projects and has been working really well for me. I'd just like to share three tips when working with Moshi Kotlin. No generics support yet Resovling generics types is still working in progress. AutoValue
Dec 17, 2017 1 min read
Kotlin

Get rid of `get` prefix for Kotlin property getters

One of the nice things Kotlin provides is interoperability with Java. Existing Java code can just call Kotlin classes/methods as if they were Java classes/methods. However, when it comes to property getters, the equivalent Java method would have a get prefix. This is can be a little bit
May 31, 2017 1 min read
Android

Use JDK 8 to prevent OOM during Gradle builds

Recently, I've run into OutOfMemoryError: PermGen space issue when building Gradle projects, especially with Kotlin. A common way to fix that is to increase the heap size for Gradle JVM, like adding org.gradle.jvmargs=-XX:MaxPermSize=512m to grade.properties. Actually, there's another simple way to fix the issue
Jan 27, 2016
Aaron He's blog © 2025
Powered by Ghost