diff --git a/CHANGELOG.md b/CHANGELOG.md index 2171476..f489e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,20 @@ # CHANGELOG +## 1.0.0-beta04 (2026-03-06) + +- Added option to include `projectGuardCheck` as part of the build tasks with the following: + +```kotlin +projectGuard { + options { + lifecycleTask = LifecycleTask.ASSEMBLE // Or LifecycleTask.CHECK + } +} +``` + +- Fixed some tasks not being cached correctly + ## 1.0.0-beta03 (2026-03-03) - Most of plugin's tasks are now cacheable diff --git a/README.md b/README.md index 40b6de9..6c4ed7f 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,25 @@ ProjectGuard protects your project's architecture by enforcing dependency rules ## How-to + +### Decide when you want to validate the rules + +```kotlin +projectGuard { + options { + // Default behavior: no immediate validation checks. + // Use `./gradlew projectGuardAggregateCheck` manually + lifecycleTask = null + + // This will validate the rules during the assemble lifecycle task + lifecycleTask = LifecycleTask.ASSEMBLE + + // This will validate the rules during the check lifecycle task + lifecycleTask = LifecycleTask.CHECK + } +} +``` + ### `guard` Denies a set of dependencies for any module that matches the provided path. @@ -91,6 +110,10 @@ projectGuard { allow(":domain") // Allow depending on other :domain modules allow(libs.junit) // Allow JUnit for testing } + restrictModule(":feature") { + allow(":domain") + allowExternalLibraries() + } } ```