Proxy configuration for Gradle

Are you using gradle behind corporate proxy? Here is how to configure proxy data for gradle (urls and credentials) gradle.properties file Gradle (and gradlew as well) is automatically reading gradle.properties file that is either in project directory or in USER_HOME/.gradle directory. Inside of gradle.properties file set properties: systemProp.http.proxyHost=http_proxy_ip_or_url systemProp.http.proxyPort=port systemProp.http.proxyUser=username systemProp.http.proxyPassword=pwd systemProp.https.proxyHost=https_proxy_ip_or_url systemProp.https.proxyPort=port systemProp.https.proxyUser=username systemProp.https.proxyPassword=password … Continue reading Proxy configuration for Gradle

Run gradle project as java application

gradle run is not a default task in gradle. To use it, you need to enable the 'application' plugin. To enable the plugin add this line to your build.gradle: apply plugin: 'application' This plugin requires one variable to be configured - the main class name: mainClassName = "com.looksok.Main" Now you can execute the gradle clean … Continue reading Run gradle project as java application

Compile gradle project with another project as a dependency

Having project dependant on another project is common situation. How to configure gradle so that it will include your dependency project in build process? There are two cases: 1. Your project is a root project and dependency is under its root When dependand project is under root in a directory structure (dependency is not being … Continue reading Compile gradle project with another project as a dependency

Spring boot MVC application tutorial

I will tutor you to create simple Spring MVC application based on Spring boot. App will have two linked web pages with thymeleaf. The project itself will be made in Eclipse as an Gradle project. Let's start! Download Source Code Source for this tutorial is available here, on GitHub Create project with Gradle build file … Continue reading Spring boot MVC application tutorial