Class AwsEmulatorExtension
java.lang.Object
io.github.gregwhitaker.awsemulator.emulator.EmulatorRuntimeConfiguration
io.github.gregwhitaker.awsemulator.emulator.AwsEmulatorExtension
Configuration for the AWS Emulator runtime and its opted-in consumers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<EmulatorMode>Default lifecycle mode for custom resource tasks in this project, across all runtime names.abstract org.gradle.api.provider.Property<String>Scenario used by seedAwsEmulator and resetAwsEmulator unless -PawsEmulator.scenario is set.org.gradle.api.NamedDomainObjectContainer<EmulatorResourceSet>Named definitions that can be attached to consumers or development scenarios.org.gradle.api.NamedDomainObjectContainer<NamedEmulatorRuntime>Independent runtimes in this project.org.gradle.api.NamedDomainObjectContainer<EmulatorScenario>voidresourceSets(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<EmulatorResourceSet>> action) voidruntimes(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<NamedEmulatorRuntime>> action) Configures named runtimes without starting Docker or connecting to external endpoints.voidscenarios(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<EmulatorScenario>> action) voiduseSharedRuntime(String ownerProject, String... resourceSets) Uses an explicitly selected project's runtime and optional named resource sets in this build.voiduseWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider) Configures a Test, JavaExec, or Exec task's child process using the managed mode.voiduseWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, EmulatorMode mode, Object... setupTasks) Connects a consumer to the selected runtime after its setup tasks complete.voiduseWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, String runtimeName, EmulatorMode mode, Object... setupTasks) Connects a consumer and its setup definitions to a named runtime and lifecycle mode.voiduseWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, String runtimeName, Object... setupTasks) Connects a consumer and its setup definitions to the named runtime in managed mode.voiduseWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, org.gradle.api.provider.Provider<EmulatorMode> mode, Object... setupTasks) Lazily selects the default runtime's mode, allowing framework integrations to supply their own mode property.voiduseWithRuntime(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, org.gradle.api.provider.Provider<String> runtimeName, org.gradle.api.provider.Provider<EmulatorMode> mode, Object... setupTasks) Lazily selects both the runtime name and lifecycle mode; the final selection applies to all setup definitions.Methods inherited from class io.github.gregwhitaker.awsemulator.emulator.EmulatorRuntimeConfiguration
docker, external, getBuildTimeoutSeconds, getCommandTimeoutSeconds, getDocker, getDockerExecutable, getEmulatorVersion, getExternal, getImage, getMemoryLimit, getObjects, getPlatform, getPort, getRegion, getStartupTimeoutSeconds, getTelemetryEnabled, getWorkingDirectory
-
Constructor Details
-
AwsEmulatorExtension
public AwsEmulatorExtension()
-
-
Method Details
-
getDefaultMode
Default lifecycle mode for custom resource tasks in this project, across all runtime names. Defaults toEmulatorMode.MANAGED; task-level modes and command-line overrides take precedence. Convenience tasks, resource-set attachments,useWithconsumers, and Spring Boot retain their own mode selection. -
getRuntimes
Independent runtimes in this project. The reserved default runtime is configured on this extension. Named runtimes inherit common settings, use automatic ports and separate working directories, and configure external connections independently. -
runtimes
public void runtimes(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<NamedEmulatorRuntime>> action) Configures named runtimes without starting Docker or connecting to external endpoints. -
getDefaultScenario
Scenario used by seedAwsEmulator and resetAwsEmulator unless -PawsEmulator.scenario is set. -
getScenarios
-
scenarios
public void scenarios(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<EmulatorScenario>> action) -
getResourceSets
Named definitions that can be attached to consumers or development scenarios. -
resourceSets
public void resourceSets(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<EmulatorResourceSet>> action) -
useWith
public void useWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider) Configures a Test, JavaExec, or Exec task's child process using the managed mode. Starts a build-owned emulator unless an external connection is enabled. -
useWith
public void useWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, EmulatorMode mode, Object... setupTasks) Connects a consumer to the selected runtime after its setup tasks complete. Setup accepts resource sets (including providers) and Gradle dependency notation. Resource sets create separate task instances for each runtime name and mode and run their fixtures in order. Resource setup tasks and their local prerequisites must use the same mode as the consumer; mismatches fail while resolving the selected task graph, before setup executes. Ordinary task modes are validated rather than reassigned; resource sets select the mode for their generated tasks. When an external connection is enabled, both modes use that endpoint without lifecycle management or state isolation. -
useWith
public void useWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, org.gradle.api.provider.Provider<EmulatorMode> mode, Object... setupTasks) Lazily selects the default runtime's mode, allowing framework integrations to supply their own mode property. Repeated calls update the mode and add setup dependencies without installing another startup action. -
useWith
public void useWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, String runtimeName, Object... setupTasks) Connects a consumer and its setup definitions to the named runtime in managed mode. -
useWith
public void useWith(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, String runtimeName, EmulatorMode mode, Object... setupTasks) Connects a consumer and its setup definitions to a named runtime and lifecycle mode. -
useWithRuntime
public void useWithRuntime(org.gradle.api.tasks.TaskProvider<? extends org.gradle.api.Task> taskProvider, org.gradle.api.provider.Provider<String> runtimeName, org.gradle.api.provider.Provider<EmulatorMode> mode, Object... setupTasks) Lazily selects both the runtime name and lifecycle mode; the final selection applies to all setup definitions. Uses a distinct method name so Groovy can distinguish lazy runtime selection from mode-plus-setup calls.
-