Developer Partner Community

Kotlin and the Java FDK by David Delabassee

Juergen Kress
PaaS Partner Adoption

As we saw in this post, it is really simple to write and deploy Serverless Kotlin functions using Fn. The Kotlin support is, in Fn, largely based on the Java support and more specifically on the Java FDK.

The initial Fn Kotlin support was a bit different than it is today as it was using the kotlinc compiler in a Docker (build) image. That approach has been recently replaced (from CLI 0.4.129) in favor of Maven using the regular Java FDK images. The only real difference between Java and Kotlin is now how the runnable artifacts (JARs) are being built (obviously!) but in both cases, those artifacts are built using Maven.

The fact that the Koltin support is based on the Java FDK offers some nice benefits to Fn users developing functions in Kotlin.

JUnit support

Both Java and Kotlin are using JUnit for unit testing. Kotlin does it via the standard kotlin.test.junit library, it enables to write testing rules in Kotlin. To get you started, a sample Kotlin based rule is automatically created when you initialize a new Kotlin function via fn init --runtime kotlin myfunc. You can then use Maven to unit test this Kotlin function, i.e. mvn test. Read the complete article here.


Developer Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic Community,Oracle,OPN,Jürgen Kress

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.