Class ProjectGenerator

java.lang.Object
com.pragma.archetype.application.generator.ProjectGenerator

public class ProjectGenerator extends Object
Application service responsible for generating project structure. Orchestrates template processing and file generation.
  • Constructor Details

  • Method Details

    • generateProject

      public List<GeneratedFile> generateProject(Path projectPath, ProjectConfig config)
      Generates the complete project structure based on configuration.
      Parameters:
      projectPath - the root directory where the project will be generated
      config - the project configuration
      Returns:
      list of generated files
    • addModuleToSettings

      public void addModuleToSettings(Path projectPath, String modulePath)
      Updates settings.gradle.kts to include a new module. Reads the file, adds the include statement if not present, and writes back.
      Parameters:
      projectPath - the project root path
      modulePath - the module path (e.g., "infrastructure:entry-points:rest-api")
    • addDependencyToModule

      public void addDependencyToModule(Path projectPath, String modulePath, String dependencyPath)
      Updates a module's build.gradle.kts to add a dependency. Reads the file, adds the dependency if not present, and writes back.
      Parameters:
      projectPath - the project root path
      modulePath - the module path (e.g., "application/app-service")
      dependencyPath - the dependency module path (e.g., ":infrastructure:entry-points:rest-api")