Posts

Showing posts with the label CI/CD

Intellij Idea Gradle project

Image
This is the continuation fo the post Introduction to Gradle . Sometime back, I wrote a blog How To: GitHub projects in Spring Tool Suite . At that time, my development environment is mostly Windows and Linux and favorite Java IDE was Eclipse becasue heavy use of Wizards. Later Intellij Idea came with better wizards. Not only that, the quality of the Idea deviated me from the Eclipse. My current environment is macOS. Most of the tools I install using homebrew : sublime, pipenv and so on. Another great installation tool is SDKMAN which I used to install the JDK, gradle and maven. As a Java Developer I need to create a gradle project in the Intellij Idea. But I want to avoid all the fancy wizards and open the project direcly in the Idea. In this example I use Gradle Idea Plugin . Here is my workflow as shown in the diagram,  It is necessary to create directories for the source sets: Java mkdir -p src/main/java/<package> mkdir -p src/main/resources/<package> Test...

Introduction To Gradle

The Gradle is a groovy based build tool. I used to install sdkman to setup Gradle as well as maven in my machine because sdkman allow you to install number of version and use any version of the tool at the time it necessary. This is a great feature I was expecting as a developer. So exciting with sdkman. In the following example, I used Gradle version 3.4.1 to setup the multi-moudle project. Here the parent gradle.build file: task wrapper (type: Wrapper){ gradleVersion = '3.4.1' distributionType = Wrapper.DistributionType.ALL } subprojects{ apply plugin: 'java' dependencies { // https://mvnrepository.com/artifact/org.slf4j/slf4j-api compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' } repositories { mavenCentral() } jar { baseName = 'example1' version = '0.0.1-SNAPSHOT' } } As shown in the above, If you need to use wrapper (which ...