-D flags when launching your application or Gradle build.
Overview
System properties control various aspects of Hot Reload:- Application properties: Core runtime behavior and lifecycle
- Build properties: Compilation and recompilation settings
- Dev tools properties: UI and debugging features
- Gradle properties: Build system integration
- Logging properties: Output and diagnostics
- Advanced properties: Experimental and internal features
Application Properties
Hot Reload Status
Target: application
Visibility: publicWill be set to
Visibility: publicWill be set to
true if the application is launched with Hot Reload and therefore can be used to detect if hot reload is ‘active’.Target: application, devtoolsProperty available in the application and ‘devtools’ pointing to the mainClass used to launch the application.
Target: application, devtools
Enum class: org.jetbrains.compose.reload.core.LaunchModeTells the application ‘how’ it was launched.
Enum class: org.jetbrains.compose.reload.core.LaunchModeTells the application ‘how’ it was launched.
Target: application, devtools, buildIndicating whether or not the application is supposed to run in headless mode.
Classpath Configuration
Target: applicationThe classpath known to be hot. This property is optional.
Target: application, devtools, buildThe java ‘argfile’ (see: Java Command-Line Argument Files) containing all arguments of the current run.
Process Management
Target: application, devtoolsPath to the current application’s pidfile.
Target: devtools, buildThe pid of the parent process. This property is used by components that shall connect to the ‘orchestration’ (e.g. recompiler, devtools, …). If the parent dies, it is expected that children exit as well.
Orchestration
Target: build, devtools, applicationCurrent ‘Orchestration Server’ port. This property is used by components that shall connect to the ‘orchestration’ (e.g. recompiler, devtools, …).
Build Properties
Hot Reload Build
Target: buildAvailable in the build (e.g. Gradle) to indicate whether or not the current build is intended to recompile classes for a hot reload build. Typically, this property is used to disable tasks which are not required to produce classes and improve build speed.
Target: buildWhether or not the hot-reload-runtime will be added as a compile dependency automatically when running a build.
Build System Selection
Target: application, devtools
Enum class: org.jetbrains.compose.reload.core.BuildSystemIndicating the application which build system is supposed to be used for recompiling. See further build-system specific (Gradle, Amper, …) properties.
Enum class: org.jetbrains.compose.reload.core.BuildSystemIndicating the application which build system is supposed to be used for recompiling. See further build-system specific (Gradle, Amper, …) properties.
Dependency Analysis
Target: application, build
true: Enable dependency analysis for virtual calls (e.g. Interfaces and their corresponding implementations will be tracked).Target: application, buildIf a given scope is marked as dirty, then Hot Reload will follow the dependency graph between fields/methods and further marks scopes as dirty. This property limits how deep this graph can be traversed.Higher values provide more accurate reloading but may impact performance.
Statics Re-initialization
Target: application, build
Visibility: experimental
Enum class: org.jetbrains.compose.reload.core.StaticsReinitializeModeSets the mode for statics re-initialization.
Visibility: experimental
Enum class: org.jetbrains.compose.reload.core.StaticsReinitializeModeSets the mode for statics re-initialization.
AllDirty: All static initializers that are recognized as dirty (affected by changes) will be re-invoked on reload.ChangedOnly: Only statics of changed classes will be re-initialized.
Dev Tools Properties
Dev Tools Lifecycle
Target: application, devtools, build
Visibility: publicFlag to disable the ‘devtools’ application entirely.
Visibility: publicFlag to disable the ‘devtools’ application entirely.
Target: application, devtools, build
Visibility: publicRun the dev tools in headless mode (No UI window shown).
Visibility: publicRun the dev tools in headless mode (No UI window shown).
Target: applicationThe classpath notation of the devTools application. Hot Reload will start DevTools in a different process and therefore needs the classpath.
Dev Tools UI
Target: application, build, devtools
Visibility: delicateSome platforms might not be able to render transparency correctly (e.g. some Linux environments). This property will allow such platforms to disable/enable transparency. This property is subject to change if the issues with transparency rendering are resolved.Default is platform-dependent:
Visibility: delicateSome platforms might not be able to render transparency correctly (e.g. some Linux environments). This property will allow such platforms to disable/enable transparency. This property is subject to change if the issues with transparency rendering are resolved.Default is platform-dependent:
Os.currentOrNull() != Os.LinuxTarget: application, build, devtools
Visibility: publicIf enabled, dev tools window will be detached from the main application.
Visibility: publicIf enabled, dev tools window will be detached from the main application.
Reload Effects
Target: application, build
Visibility: publicEnable reload effects that are shown in the UI when a reload is triggered.
Visibility: publicEnable reload effects that are shown in the UI when a reload is triggered.
Gradle-Specific Properties
See Gradle Properties for detailed Gradle configuration.Target: application, devtoolsThe ‘java home’ used to run Gradle. The recompiler will pick the same java to launch the recompiler in order to avoid cache misses or other issues.
Target: application, devtoolsThe ‘offline mode’ used to run Gradle. The recompiler will pick the same offline mode to launch the recompiler in order to avoid cache misses or other issues.
Target: application, devtoolsThe root path to the current Gradle project.
Target: application, devtoolsThe gradle ‘path’ to the ‘project’ which is currently executed and needs recompiling (e.g.
:app:, :, or :someModule:composeApp).Target: application, devtoolsThe name of the task which is supposed to be recompiled for hot reload. This is typically the name of a ‘ComposeReloadHotClasspathTask’ task.
Target: application, devtools, build
Visibility: delicate
Visibility: delicate
true: Compose Hot Reload will start a recompiler Gradle Daemon, which will continuously rebuild/reload the project by watching all inputs to the buildfalse: The user is expected to rebuild/reload manually by launching a task (or using tooling)
Target: application, devtools, build
Visibility: delicate
Visibility: delicate
true: Compose Hot Reload will launch a warmup recompile request when the application is started, to ensure that the recompiler Gradle daemon is running and ready to handle requestsfalse: No warmup request will be sent, first reload request may take longer time
Target: application, devtools, build
Visibility: delicate
Visibility: delicate
true: Compose Hot Reload will try to optimize your build during hot reload (e.g. by enabling Gradle’s configuration cache during ‘recompilation’)false: No optimization will be performed
Amper Properties
Target: application, devtoolsThe root path to the current Amper project.
Target: application, devtoolsThe name of the task which is supposed to be recompiled for hot reload in Amper.
Logging Properties
Target: application, devtools, build
Visibility: public
Enum class: org.jetbrains.compose.reload.core.Logger.LevelMinimum logging level. Available values:
Visibility: public
Enum class: org.jetbrains.compose.reload.core.Logger.LevelMinimum logging level. Available values:
Trace, Debug, Info, Warning, Error.Target: application, build, devtools
Visibility: publicEnable output of all logs into the standard output.
Visibility: publicEnable output of all logs into the standard output.
JetBrains Runtime Properties
Target: build
Visibility: delicateThe path to the ‘JetBrainsRuntime’ which shall be used when launching the app.Note: This is a build-only property!
Visibility: delicateThe path to the ‘JetBrainsRuntime’ which shall be used when launching the app.Note: This is a build-only property!
Target: build
Visibility: delicateSpecifies the default ‘JetBrains Runtime’ version that shall be used (e.g.
Visibility: delicateSpecifies the default ‘JetBrains Runtime’ version that shall be used (e.g.
21 or 25).Target: build
Visibility: experimentalAutomatically provisions compatible ‘JetBrains Runtime’ version that shall be used for hot reload tasks.
Visibility: experimentalAutomatically provisions compatible ‘JetBrains Runtime’ version that shall be used for hot reload tasks.
Target: build
Visibility: internalIf enabled Compose Hot Reload Gradle plugin will attempt to automatically provision compatible ‘JetBrains Runtime’ version via Gradle’s toolchain resolution mechanism. This property is internal and only intended for use in tests.
Visibility: internalIf enabled Compose Hot Reload Gradle plugin will attempt to automatically provision compatible ‘JetBrains Runtime’ version via Gradle’s toolchain resolution mechanism. This property is internal and only intended for use in tests.
IntelliJ IDEA Integration
Target: build, application, devtoolsSet by IntelliJ to signal the Gradle Plugin that IDE tooling is available. Setting this variable will relax the Gradle Plugin to not touch existing run tasks as we expect the IDE to provide a convenient way of launching in hot-reload mode.
Target: build, application, devtoolsSet by IntelliJ during builds to convey its ‘support level’ for hot reload.
- Not Present, but
idea.compose.hot-reloadbeing set: Supports running hot run tasks 2: Support running ‘hot run’ tasks and ‘hot reload’ tasks3: Supports providing IDEA runtime usingidea.compose.hot-reload.jbr
Target: buildForwards the ‘JetBrains Runtime’ which is bundled with the current version of IntelliJ (points to the binary
bin/java). Can be used as ‘fallback’ when no other JBR is found.Target: application, devtools, buildNote: Expected as an environment variable, as this is expected to be transitively available to all child processes.Currently, launching applications with hot reload might be done through a couple of intermediate processes. For example, launching a test will go through a chain like:When a run configuration is started in ‘debug mode’ intellij will set the system property
idea.debugger.dispatch.port. This will indicate that a server is listening at this port, which can be used to provision debugging servers.This debug port will then be made available as an environment variable using this key. Launching the final application will respect this port, if present and provision a debugging session. This will allow a test to be deeply debuggable by just pressing ‘Debug’.Target: buildEnable this property to allow propagating the
idea.debugger.dispatch.port to all subprocesses. This is useful when debugging dev tools.Note: This may break the debugging of the user application if IntelliJ is not configured to accept multiple debugging sessions. Not recommended to use outside of hot reload debugging.Advanced Properties
Standard I/O Redirection
Target: build, application, devtools
Visibility: delicateUsed by ‘async’/‘non-blocking’ launches of the application. Will point to the stdin file (can be pipe).‘async’/‘non-blocking’ mode is subject to change and might be removed in the future.
Visibility: delicateUsed by ‘async’/‘non-blocking’ launches of the application. Will point to the stdin file (can be pipe).‘async’/‘non-blocking’ mode is subject to change and might be removed in the future.
Target: build, application, devtools
Visibility: delicateUsed by ‘async’/‘non-blocking’ launches of the application. Will point to a file where the stdout is supposed to be written to.‘async’/‘non-blocking’ mode is subject to change and might be removed in the future.
Visibility: delicateUsed by ‘async’/‘non-blocking’ launches of the application. Will point to a file where the stdout is supposed to be written to.‘async’/‘non-blocking’ mode is subject to change and might be removed in the future.
Target: build, application, devtools
Visibility: delicateUsed by ‘async’/‘non-blocking’ launches of the application. Will point to a file where the stderr is supposed to be written to.‘async’/‘non-blocking’ mode is subject to change and might be removed in the future.
Visibility: delicateUsed by ‘async’/‘non-blocking’ launches of the application. Will point to a file where the stderr is supposed to be written to.‘async’/‘non-blocking’ mode is subject to change and might be removed in the future.
Deprecated Properties
Target: application, build, devtools
Visibility: deprecatedEnables support for Gradle’s incubating ‘isolated projects’ feature.
Visibility: deprecatedEnables support for Gradle’s incubating ‘isolated projects’ feature.
Usage Examples
Setting Properties via Command Line
Setting Properties in gradle.properties
Checking Hot Reload Status in Code
Optimizing Build for Hot Reload
Property Visibility Levels
Properties are marked with visibility levels indicating their stability:- public: Stable API, safe to use in production
- experimental: New features, API may change
- delicate: Advanced features, use with caution
- internal: For internal use only, may change without notice
- deprecated: Will be removed in future versions
- (no marker): Standard properties, generally stable
Target Environments
Each property specifies which environments it applies to:- application: Runtime application process
- devtools: Dev tools UI process
- build: Gradle build process