From 4fa434fcf2cd402bee54d72cc0f760ae5d102ee2 Mon Sep 17 00:00:00 2001 From: Daniil Tsarev Date: Thu, 3 Apr 2025 17:49:48 +0200 Subject: [PATCH] GH-1138 - Fix Kotlin examples for module and named interfaces declarations and dependencies. Signed-off-by: daniil.tsaryov@jetbrains.com --- .../modules/ROOT/pages/fundamentals.adoc | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/docs/antora/modules/ROOT/pages/fundamentals.adoc b/src/docs/antora/modules/ROOT/pages/fundamentals.adoc index 7595fe40..8045c404 100644 --- a/src/docs/antora/modules/ROOT/pages/fundamentals.adoc +++ b/src/docs/antora/modules/ROOT/pages/fundamentals.adoc @@ -242,10 +242,16 @@ Kotlin:: + [source, kotlin, role="secondary", chomp="none"] ---- -@org.springframework.modulith.ApplicationModule( +package example.inventory + +import org.springframework.modulith.ApplicationModule +import org.springframework.modulith.PackageInfo + +@ApplicationModule( type = Type.OPEN ) -package example.inventory +@PackageInfo +class ModuleMetadata {} ---- ====== @@ -358,10 +364,16 @@ Kotlin:: + [source, kotlin, role="secondary", chomp="none"] ---- -@org.springframework.modulith.ApplicationModule( +package example.inventory + +import org.springframework.modulith.ApplicationModule +import org.springframework.modulith.PackageInfo + +@ApplicationModule( allowedDependencies = "order :: spi" ) -package example.inventory +@PackageInfo +class ModuleMetadata {} ---- ====== @@ -387,10 +399,16 @@ Kotlin:: + [source, kotlin, role="secondary", chomp="none"] ---- -@org.springframework.modulith.ApplicationModule( +package example.inventory + +import org.springframework.modulith.ApplicationModule +import org.springframework.modulith.PackageInfo + +@ApplicationModule( allowedDependencies = "order :: *" ) -package example.inventory +@PackageInfo +class ModuleMetadata {} ---- ======