Overview
System properties are set using the-D flag when running your application or as Gradle properties. They control aspects like:
- Hot reload activation and behavior
- Dev tools window appearance
- Build optimizations
- Debugging and logging
- Advanced configuration
Build-Time vs Runtime Properties
Build-Time Properties
These properties are read during the Gradle build process and affect how hot reload tasks are configured:- Used in
build.gradle.ktsfiles - Affect task configuration and dependencies
- Set using
gradle.propertiesor-Dflags during build
Runtime Properties
These properties are read when the application is running:- Control application behavior
- Configure dev tools and orchestration
- Set using
-Dflags when launching the app
Shared Properties
Many properties are available in both build and runtime contexts, allowing consistent configuration across your development workflow.Commonly Used Properties
Hot Reload Activation
compose.reload.isActive
Indicates whether Hot Reload is active. Set to
true when the application is launched with hot reload.Usage: This property is automatically set by the hot reload tasks. You can check it programmatically:
Dev Tools Configuration
compose.reload.devToolsEnabled
Controls whether the dev tools window is launched.
compose.reload.devToolsHeadless
Run dev tools in headless mode without showing the UI window.
compose.reload.devToolsDetached
Launch the dev tools window as a detached, regular window instead of snapping it to the main application.
Build Optimization
compose.reload.isHotReloadBuild
Indicates whether the current build is a hot reload recompilation. Used to disable unnecessary tasks and improve build speed.
build.gradle.kts
compose.reload.gradle.build.optimize
Enable build optimizations during hot reload, such as Gradle’s configuration cache.
Logging and Debugging
compose.reload.logLevel
Set the minimum logging level for hot reload components.
Values:
Trace, Debug, Info, Warning, Error
compose.reload.logStdout
Output all hot reload logs to standard output.
UI Effects
compose.reload.effectsEnabled
Enable visual reload effects shown in the UI when a reload is triggered.
JetBrains Runtime Configuration
compose.reload.jbr.version
Specifies the default JetBrains Runtime version to use (e.g., 21 or 25).
compose.reload.jbr.autoProvisioningEnabled
Automatically provision a compatible JetBrains Runtime for hot reload tasks.
gradle.properties
Gradle Build System
gradle.build.project
The Gradle project path that needs recompiling (e.g.,
:app:, :, or :someModule:composeApp).gradle.build.task
The name of the task to recompile for hot reload, typically a
ComposeReloadHotClasspathTask.gradle.offline.mode
The offline mode setting for Gradle. The recompiler uses the same setting to avoid cache misses.
Advanced Properties
compose.reload.virtualMethodResolveEnabled
Enable dependency analysis for virtual calls (interfaces and their implementations).
compose.reload.dirtyResolveDepthLimit
Limit how deep the dependency graph is traversed when marking scopes as dirty.
compose.reload.staticsReinitializeMode
Controls how static fields are re-initialized after reload.
Values:
AllDirty: Re-invoke all static initializers recognized as dirtyChangedOnly: Only re-initialize statics of changed classes
Setting Properties
Via Command Line
Use the-D flag when running Gradle tasks:
Via gradle.properties
Add properties to yourgradle.properties file:
gradle.properties
Via IDE Run Configuration
In IntelliJ IDEA or Android Studio:- Open Run | Edit Configurations
- Select your hot reload run configuration
- Add VM options:
-Dcompose.reload.devToolsDetached=true
Programmatically
Check properties in your code:Common Configurations
Headless Development
For CI or automated testing:Debugging Hot Reload
Detached Dev Tools (Virtual Desktops)
Minimal Dev Tools
Property Reference
For a complete list of all available properties, see the properties.yaml file in the Compose Hot Reload repository. The properties are documented with:- key: The property name
- type: Data type (boolean, int, string, enum, file, etc.)
- target: Where the property is used (build, application, devtools)
- default: Default value
- visibility: public, delicate, experimental, internal, or deprecated
- documentation: Detailed description
Property Visibility
- public: Stable properties for general use
- delicate: Use with caution; behavior may change
- experimental: Early-stage features; subject to change
- internal: For internal use only; not recommended for users
- deprecated: Will be removed in future versions