Overview
Gradle properties control how Hot Reload integrates with your Gradle build:- Project and task identification
- Build optimization and caching
- Java toolchain configuration
- Continuous rebuild mode
- Build warmup and performance
gradle.propertiesfile (prefixed withsystemProp.)- Command line flags (
-Dflags) - Environment variables
- Gradle build scripts
Project Configuration
Build Root
Target: application, devtoolsThe root path to the current Gradle project. This property is automatically set by the Hot Reload Gradle plugin and used by the recompiler to locate your project.
Project Path
Target: application, devtoolsThe gradle ‘path’ to the ‘project’ which is currently executed and needs recompiling.Examples:
:(root project):app::someModule:composeApp
Hot Reload Task
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.Java Toolchain
Java Home
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.Why this matters: Using different JDKs between the main build and recompilation can cause:
- Gradle cache misses
- Incompatible bytecode
- Performance degradation
Build Modes
Hot Reload Build Detection
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.Use case: Skip expensive tasks during hot reload recompilation.
Offline Mode
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.The Hot Reload recompiler will automatically inherit this setting.
Build Optimization
Build Optimization
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
- Enables Gradle configuration cache for recompilation
- Skips unnecessary tasks
- Reuses build outputs when possible
Continuous Build Mode
Target: application, devtools, build
Visibility: delicateIn continuous mode, Hot Reload watches for file changes and automatically triggers recompilation without manual intervention.
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)
Build Warmup
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
- Faster first reload (Gradle daemon already running)
- Pre-resolved dependencies
- Warmed up JVM
Runtime Dependencies
Auto Runtime Dependencies
Target: buildWhether or not the hot-reload-runtime will be added as a compile dependency automatically when running a build.When enabled, the Gradle plugin automatically adds Hot Reload runtime dependencies to your project.
JetBrains Runtime (JBR)
JBR Binary
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!
JBR Version
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).Auto JBR Provisioning
Target: build
Visibility: experimentalAutomatically provisions compatible ‘JetBrains Runtime’ version that shall be used for hot reload tasks.When enabled, Hot Reload will automatically download and configure a compatible JBR if none is found.
Visibility: experimentalAutomatically provisions compatible ‘JetBrains Runtime’ version that shall be used for hot reload tasks.When enabled, Hot Reload will automatically download and configure a compatible JBR if none is found.
Gradle JBR Provisioning
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
IDEA Hot Reload Support
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.Automatically set by IntelliJ IDEA. Do not set manually.
IDEA Support Version
Target: build, application, devtoolsSet by IntelliJ during builds to convey its ‘support level’ for hot reload.Support levels:
- 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
IDEA JBR Path
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.Automatically set by IntelliJ IDEA. Do not set manually.Deprecated
Isolated Projects
Target: application, build, devtools
Visibility: deprecatedEnables support for Gradle’s incubating ‘isolated projects’ feature.Note: This property is deprecated and may be removed in future versions.
Visibility: deprecatedEnables support for Gradle’s incubating ‘isolated projects’ feature.Note: This property is deprecated and may be removed in future versions.
Configuration Examples
Basic gradle.properties Configuration
Command Line Configuration
Conditional Task Configuration
Multi-Module Project Configuration
Optimizing Build Performance
Passing Properties Between Processes
Hot Reload automatically passes relevant properties between Gradle and application processes:Best Practices
Performance Optimization
-
Enable build optimization:
-
Skip unnecessary tasks:
-
Use warmup for frequent reloads:
Stability
-
Pin Java version:
-
Use offline mode for reproducible builds:
-
Disable experimental features in production:
Debugging
-
Enable verbose logging:
-
Disable optimizations when troubleshooting:
Related
- System Properties - All Hot Reload system properties
- Usage Configuration - Build script configuration
- IDE Usage - IDE integration