Oracle has introduced version 1.0.0 of the open-source Graal Cloud Native (GCN) IntelliJ IDEA Plugin for the Ultimate, Community and Aqua editions of IntelliJ IDEA. GCN is a cloud-agnostic development framework based on the Micronaut framework. The plugin provides a new project wizard for IntelliJ to create a project once and execute it on various cloud platforms.
The plugin may be installed via the JetBrains Marketplace website or inside IntelliJ via Settings | Plugins and then searching Oracle Graal Cloud Native:
After installing the plugin, a new project may be created via File | New | Project and then selecting Graal Cloud Native on the left:
When clicking Next, the services which are required for the project, may be selected:
Lastly, the features, for example, the Official Kubernetes Java Client, MySQL and the GraalVM Native Image may be selected:
After clicking Create, the following files and directories are created:
For example, the lib/build.gradle file contains the features selected in the New Project wizard:
plugins {
id("cloud.graal.gcn.gcn-bom")
id("io.micronaut.library")
id("com.google.cloud.tools.jib")
}
version = "1.0-SNAPSHOT"
group = "com.example"
repositories {
mavenCentral()
maven { url "https://maven.oracle.com/public" }
}
dependencies {
annotationProcessor("io.micronaut:micronaut-http-validation")
annotationProcessor("io.micronaut.serde:micronaut-serde-processor")
micronautBoms(platform("cloud.graal.gcn:gcn-bom:4.3.7.2"))
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut.kubernetes:micronaut-kubernetes-client")
implementation("io.micronaut.kubernetes:micronaut-kubernetes-discovery
-client")
implementation("io.micronaut.serde:micronaut-serde-jackson")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("com.mysql:mysql-connector-j")
}
java {
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}
micronaut {
testRuntime("junit5")
processing {
incremental(true)
annotations("com.example.*")
}
}
Alternatively, the plugin may be built from the GitHub source-code by executing the ./gradlew build
command. The resulting plugin zip file is located in the /build/distributions directory. Within IntelliJ, the install plugin from disk option may be used to load the zip file.
Recently, Oracle announced that Graal Cloud Native (GCN) will now be called the Graal Development Kit for Micronaut (GDK). The name was changed, after feedback from the users, to clearly describe the project. At this point in time, GCN is still heavily used and it's unclear if the name of the IntelliJ plugin will change as well.
The Graal Development Kit for Micronaut 4.3.7 is an Oracle build based on the open-source Micronaut framework 4.3.7. GDK offers Micronaut framework modules for cloud application development and GraalVM Native Image. The modules provide a platform independent solution for various cloud services such as: Oracle Cloud Infrastructure (OCI), Amazon Web Services (AWS), Google Cloud Platform (GCP). Support for Microsoft Azure is currently under development.
More information on the IntelliJ plugin, for example the contribution guide and security vulnerability disclosure process, is available on GitHub. More information on GDK is available in the Hands-on Labs, Guides and the Get Started guide. The Micronaut website provides Guides and Documentation which aren't specific for Oracle's GDK.