Index
- Setup
- Create a simple application
- Create an application with root project
- Adding internal dependencies
- Publishing on maven repository
- Using "external" projects
- Using Spring boot
- Adding Junit and JaCoCo
- Profiles
Source code on github: https://github.com/kendarorg/Gradle101
Setup
Download the sources
Windows Portable
Let's start with an harmless setup. Create a directory and extract all the following "portable servers" (they can be founded, with others at http://kendar.org/?p=/system/portableservers). If you had already installed a JDK from the same source remember to choose the jdk-11.
- Portable servers Common: http://www.kendar.org/hugefiles/portable-server-commons-2.0.0.zip
- Gradle: http://www.kendar.org/hugefiles/gradle-6.0.1.zip
- OpenJDK 13: http://www.kendar.org/hugefiles/jdk-13.0.1.zip
Then you can run "pgradle.bat" directly from explorer and go into the directory in wihich you will create your projects
Windows standard
Or you can bloat your machine with a complete setup
-
Install OpenJdk, you can download it here: https://jdk.java.net/13/ extracting it in C:\Program Files\jdk-13.0.2
-
Go on 'Control Panel->(System and Security->)System->Advanced System Settings'
-
Open the 'Advanced' tab and 'Environment variables'
-
Add to 'User variables' on the 'Path' the following:
;C:\Program Files\jdk-13.0.2\bin -
The new JAVA_HOME variable with value C:\Program Files\jdk-13.0.2
-
The new JAVA variable with value C:\Program Files\jdk-13.0.2\bin\java.exe
-
Download and install Gradle following the instructions https://gradle.org/install/#manually