Overview
ThecomposeHotReload extension is automatically created when the plugin is applied. It provides project-wide configuration for Compose Hot Reload.
Extension Name: composeHotReload
Extension Class: ComposeHotReloadExtension
Package: org.jetbrains.compose.reload.gradle
Basic Usage
build.gradle.kts
Extension Class
Configuration
Currently, the extension class is minimal and serves as a placeholder for future configuration options. Most configuration is done through:- Gradle Properties - Set in
gradle.propertiesor via command line - Task Configuration - Configure individual tasks directly
- Environment Variables - For IDE integration
Accessing the Extension
You can access the extension in your build script:build.gradle.kts
build.gradle.kts
Related Properties
While the extension itself doesn’t have configuration properties yet, the plugin respects several Gradle properties:Runtime Dependencies
Automatically add hot reload runtime dependencies to dev compilations.Set in
gradle.properties:Auto Reload Mode
Enable continuous build mode for automatic recompilation.
Output Redirection
Custom file path for stdout redirection in async run tasks.
Custom file path for stderr redirection in async run tasks.
Custom file path for stdin in async run tasks.
Debugging
Enable subprocess debugging support.
Environment variable for IntelliJ debugger integration.Set by the IDE when debugging is enabled.
Project Extension Property
The plugin also adds aisHotReloadBuild property to the Project object:
true when the current build was triggered by Compose Hot Reload for recompilation.
Usage
build.gradle.kts
- Skipping certain tasks during hot reload builds
- Enabling faster incremental compilation
- Customizing build behavior for development
Future Configuration
The extension is designed to be extended with configuration options in future releases. Potential future additions may include:- Hot reload behavior settings
- Custom compilation targets
- Performance tuning options
- Advanced debugging configuration
Example: Complete Configuration
build.gradle.kts
Internal API
The extension has an internalproject property: