Getting Started
Requirements
-
You need Java JRE installed (Java 17 or later).
-
To use the plugin you need Gradle version 9.2.1 or later.
Using the plugin
To start you need to create a directory for the project, then you should add a build.gradle file with following
content into your build.gradle file.
plugins {
id 'co.com.bancolombia.cleanArchitecture' version '5.0.5'
}
Then you can list the tasks available with the command:
gradle tasks
You can follow one of the next steps to create a quick start project with commands
Quick Start
- Mac OS / Linux
- Windows
mkdir scaffold-quick-start
cd scaffold-quick-start
echo "plugins {
id 'co.com.bancolombia.cleanArchitecture' version '5.0.5'
}" > build.gradle
gradle wrapper
./gradlew ca --name=ScaffoldQuickStart
./gradlew gep --type webflux
./gradlew bootRun
PowerShell
# Create a directory and navigate into it
New-Item -ItemType Directory -Name "scaffold-quick-start"
Set-Location -Path "scaffold-quick-start"
# Create the build.gradle file with the specified content
@"
plugins {
id 'co.com.bancolombia.cleanArchitecture' version '5.0.5'
}
"@ | Set-Content -Path "build.gradle"
# Run the Gradle commands
gradle wrapper
.\gradlew ca --name=ScaffoldQuickStart
.\gradlew gep --type webflux
.\gradlew bootRun
CMD
@echo off
:: Create a directory and navigate into it
mkdir scaffold-quick-start
cd scaffold-quick-start
:: Create the build.gradle file with the specified content
(
echo plugins {
echo id 'co.com.bancolombia.cleanArchitecture' version '5.0.5'
echo }
) > build.gradle
:: Run the Gradle commands
gradle wrapper
gradlew ca --name=ScaffoldQuickStart
gradlew gep --type webflux
gradlew bootRun
Then open your browser and go to http://localhost:8080/api/usecase/path and it
will reply with an empty string, to change the response you can modify the Handler class in the
entry-points/reactive-web
Build and coverage reports
Run the complete build and the merged JaCoCo report with:
./gradlew build jacocoMergedReport
Gradle builds the task graph for both requested tasks and executes shared tasks only once. The
command runs the standard build lifecycle (assemble and check), including compilation,
validateStructure, and the subproject tests. The merged report adds these quality tasks:
| Task | What it does |
|---|---|
jacocoTestReport in each module | Collects JaCoCo coverage after that module's tests. |
jacocoMergedReport at the root | Merges module execution data into root XML and HTML reports. |
pitest in each module | Runs mutation analysis when Pitest is declared in the root plugins {} block. |
pitestReportAggregate at the root | Combines module PIT results into root HTML and XML reports when Pitest is declared. |
When Pitest is not declared, the build, module tests, and merged JaCoCo report still run; PIT tasks are omitted. See JaCoCo Merged Report for report locations and task details.
Tasks
The Scaffolding Clean Architecture plugin will allow you the next tasks: