Interface GenerationRequest

All Known Implementing Classes:
ImmutableGenerationRequest

@Immutable public interface GenerationRequest
Base for a generation request with all the details of what to do during generation.
Author:
Ashley Scopes
  • Method Details

    • getBinaryMavenPlugins

      Collection<? extends MavenProtocPlugin> getBinaryMavenPlugins()
      Binary protoc plugins that should be resolved from Maven repositories.
      Returns:
      the collection of plugins.
    • getBinaryPathPlugins

      Collection<? extends PathProtocPlugin> getBinaryPathPlugins()
      Binary protoc plugins that should be resolved from the system $PATH.
      Returns:
      the collection of plugins.
    • getBinaryUrlPlugins

      Collection<? extends UrlProtocPlugin> getBinaryUrlPlugins()
      Binary protoc plugins that should be resolved from URLs.
      Returns:
      the collection of plugins.
    • getDependencyResolutionDepth

      DependencyResolutionDepth getDependencyResolutionDepth()
      The preference for how to resolve transitive dependencies by default.
      Returns:
      the dependency resolution depth preference.
    • getDependencyScopes

      Set<String> getDependencyScopes()
      The dependency scopes to allow when searching the Maven project dependency list for *.proto files.
      Returns:
      the set of scopes.
    • getEnabledLanguages

      Collection<Language> getEnabledLanguages()
      The collection of supported langagues to enable in protoc.
      Returns:
      the languages.
    • getExcludes

      List<String> getExcludes()
      The collection of *.proto path patterns to exclude from being passed to protoc.
      Returns:
      the collection of glob patterns.
    • getImportDependencies

      Collection<? extends MavenDependency> getImportDependencies()
      Additional user-defined Maven dependencies to include in the protoc import path.
      Returns:
      the collection of dependencies.
    • getImportPaths

      Collection<Path> getImportPaths()
      Additional user-defined paths relative to the project root to include in the protoc import path.
      Returns:
      the collection of paths.
    • getIncludes

      List<String> getIncludes()
      The collection of *.proto path patterns to include to be passed to protoc.
      Returns:
      the collection of glob patterns.
    • getJvmMavenPlugins

      Collection<? extends MavenProtocPlugin> getJvmMavenPlugins()
      Java executable projects that satisfy the protoc plugin interface to wrap in bootstrapping scripts and pass to protoc.
      Returns:
      the collection of plugins.
    • getOutputDirectory

      Path getOutputDirectory()
      The path to write all output files to.
      Returns:
      the output path.
    • getOutputDescriptorFile

      @Nullable Path getOutputDescriptorFile()
      The output protobin descriptor file to create, or null if no descriptor file should be created.
      Returns:
      the path to the descriptor file to output, or null.
    • getProtocVersion

      String getProtocVersion()
      The version of protoc to use.

      This will be one of:

      • A Maven version string (such as 4.29.3), to indicate to pull from the Maven repositories;
      • The literal string PATH, to indicate to invoke the protoc binary on the system $PATH;
      • A URL to a binary to execute.
      Returns:
      the version indicator.
    • getSourceDependencies

      Collection<? extends MavenDependency> getSourceDependencies()
      Additional user-defined Maven dependencies to include in the protoc import path, and to compile.
      Returns:
      the collection of dependencies.
    • getSourceRoots

      Collection<Path> getSourceRoots()
      Paths relative to the project root that contain *.proto sources to compile.
      Returns:
      the source roots.
    • getSourceRootRegistrar

      SourceRootRegistrar getSourceRootRegistrar()
      The registrar strategy to use to notify Maven of generated sources.
      Returns:
      the registrar strategy.
    • isEmbedSourcesInClassOutputs

      boolean isEmbedSourcesInClassOutputs()
      Whether to include input proto sources in the output class directory.
      Returns:
      the boolean preference.
    • isFailOnInvalidDependencies

      boolean isFailOnInvalidDependencies()
      Whether to treat invalid dependencies as a build error.
      Returns:
      the boolean preference.
    • isFailOnMissingSources

      boolean isFailOnMissingSources()
      Whether to treat non-existent source roots as a build error.
      Returns:
      the boolean preference.
    • isFailOnMissingTargets

      boolean isFailOnMissingTargets()
      Whether to treat builds with no enabled languages, plugins, or descriptor file outputs as a build error.
      Returns:
      the boolean preference.
    • isFatalWarnings

      boolean isFatalWarnings()
      Whether to treat protoc build warnings as errors.
      Returns:
      the boolean preference.
    • isIgnoreProjectDependencies

      boolean isIgnoreProjectDependencies()
      Whether to skip discovering *.proto files to import from the Maven project <dependencies/> block.
      Returns:
      the boolean preference.
    • isIncrementalCompilationEnabled

      boolean isIncrementalCompilationEnabled()
      Whether to enable incrementally compiling sources.
      Returns:
      the boolean preference.
    • isLiteEnabled

      boolean isLiteEnabled()
      Whether to request the generation of "lite" sources.
      Returns:
      the boolean preference.
    • isOutputDescriptorIncludeImports

      boolean isOutputDescriptorIncludeImports()
      Whether to include imports in the output protobin descriptor.
      Returns:
      the boolean preference.
    • isOutputDescriptorIncludeSourceInfo

      boolean isOutputDescriptorIncludeSourceInfo()
      Whether to include source information in the output protobin descriptor.
      Returns:
      the boolean preference.
    • isOutputDescriptorRetainOptions

      boolean isOutputDescriptorRetainOptions()
      Whether to retain build option metadata in the output protobin descriptor.
      Returns:
      the boolean preference.
    • isRegisterAsCompilationRoot

      boolean isRegisterAsCompilationRoot()
      Whether to mark generated sources as candidates for compilation with the maven-compiler-plugin and similar plugins.
      Returns:
      the boolean preference.