Category: JVM

How to create a Google Cloud Function using Gradle with Kotlin DSL (part 2)

How to create a Google Cloud Function using Gradle with Kotlin DSL (part 2)

In a previous article, we created a Gradle project with a simple Cloud Function. Now it’s time to build and deploy it to the cloud.

Before you can deploy anything to the Google Cloud you have to set up your account. If you did that you can skip it. If not, I recommend doing all the steps described in “Before you begin” in this guide. It’s important that you installed and configured Google Cloud CLI on your computer.

Continue reading “How to create a Google Cloud Function using Gradle with Kotlin DSL (part 2)”
How to create a Google Cloud Function using Gradle with Kotlin DSL

How to create a Google Cloud Function using Gradle with Kotlin DSL

The Google Cloud Functions is a great way to run your code without the need to manage a server and runtime environment. Thanks to Cloud Free Tier it is also free of charge up to 2 million calls monthly.

I will use Kotlin language because it is a good choice for backend services. It’s less verbose than Java and has faster compilation than Scala.

Continue reading “How to create a Google Cloud Function using Gradle with Kotlin DSL”
Different java version for each project

Different java version for each project

Since September 2017 Oracle started releasing new Java language version every 6 months. Of course many versions are non-LTS and I used them only to check out new language features. Last year Java 17 was released (LTS release) and it’s getting more and more adoption.

At my work I usually work with many projects each opened in separate IntelliJ IDEA window. It’s pretty common when you work with microservices. Because each service is maintained by different team it is not unusual that one service is using Java 11 and other requires Java 17.

To install and manage many versions of JDK I prefer to use SDKMAN! (sdkman.io). It manages not only Java SDK but also other language SDKs like Scala, Kotlin. No need to look for new tool or learn how to use them.

Continue reading “Different java version for each project”