Posts

Showing posts with the label vertx

Step 1 Initially setting up gradle and create Vert x hello world Microservices with Vertx

Step 1 Initially setting up gradle and create Vert x hello world Microservices with Vertx Initially setting up gradle and vert.x. We will expand in this script, but it is easier to understand in its infancy. We are using John Rengelmans Shadow Jar Plugin which is similar to the Maven which is similar to Maven Shade plugin but for  Gradle  and is faster than the Gradle built-in fat jar. I am not sure how we will do the final deploy. This is a step down the road. The direction might change. At this point the gradle build file is pretty basic. Gradle build file plugins { id java id application id com.github.johnrengelman.shadow version 1.2.2 id idea } group rickhigh version 1.0-SNAPSHOT idea { project { languageLevel = 1.8 } } repositories { mavenCentral() maven { url = http://oss.sonatype.org/content/repositories/snapshots/ } mavenLocal() /* Just in case we want to use local artifacts that we build locally. */ } sourceCompatibility = 1.8 mainClassName =...

Step 3 Adding Kotlin Microservices with Vertx

Step 3 Adding Kotlin Microservices with Vertx We decided to add Kotlin to the mix. It is terse and modern and very compatible with the core Java libs. It builds on your knowledge of Java. The Idea guys explain how to do add Kotlin to a Gradle project, yet it still took some messing around. You can find the source code for this in this branch. To do this we added the Kotlin plugin to gradle. Adding Kotlin to gradle buildscript { repositories { mavenCentral() } dependencies { classpath org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.0-beta-4584 } } plugins { id java id application id com.github.johnrengelman.shadow version 1.2.2 id idea } apply plugin : " kotlin " ... dependencies { ... compile org.slf4j:slf4j-api:1.7.12 compile org.jetbrains.kotlin:kotlin-stdlib:1.0.0-beta-4584 testCompile group : junit , name : junit , version : 4.11 } Most of the gradle build files stays the same. The way we build and execute stays the same as well. We left  WebVerticle ...