Advanced Projects
Prerequisites: Level 3 — Advanced
Build these using metaprogramming, DSLs, concurrency, Gradle, Jenkins, and Spock from Level 3.
1. A Deployment DSL
Design a DSL for describing deployments (service 'api' { replicas 3; env 'prod' }), load DSL files with a custom script base class and a
SecureASTCustomizer, validate them, and print a plan. Cover it with
Spock specifications.
2. A Gradle Plugin
Write a Gradle convention plugin in Groovy that applies CodeNarc, JaCoCo, and Spock with shared settings, adds a custom task that generates a build report, and use it from a multi-project build.
3. A Jenkins Shared Library
Create a Jenkins shared library with global steps for building, testing,
and publishing a Gradle project, plus a declarative Jenkinsfile that uses
it with parallel stages — and unit-test the library's Groovy classes with
Spock.