Plugin Configuration¶
Complete reference for configuring the Fakt Gradle plugin.
Complete Configuration Reference¶
All available configuration options in your module’s build.gradle.kts:
// build.gradle.kts
import com.rsicarelli.fakt.compiler.api.LogLevel
plugins {
alias(libs.plugins.fakt)
}
fakt {
// Enable or disable the plugin (default: true)
enabled.set(true)
// Control logging verbosity (default: INFO)
logLevel.set(LogLevel.INFO) // Options: QUIET, INFO, DEBUG
// Multi-module: Collect fakes from another module (default: not set)
@OptIn(com.rsicarelli.fakt.compiler.api.ExperimentalFaktMultiModule::class)
collectFakesFrom(projects.core.analytics)
}
Configuration Properties¶
| Flag | Default | Example |
|---|---|---|
| enabled | true |
|
| logLevel | INFO |
|
| collectFrom | Not set |
Log Level Details¶
Multi-Module Configuration¶
| Mode | Example |
|---|---|
| Type-safe accessor | |
| String-based path |
For complete multi-module documentation, see Multi-Module Guide.
IDE Integration¶
IntelliJ IDEA / Android Studio¶
Generated fakes appear in build/generated/fakt/ and are automatically indexed.
Enable K2 Mode for better autocomplete:
- Settings → Languages & Frameworks → Kotlin
- Enable K2 mode
- Restart IDE
K2 mode improves factory function autocomplete and type inference.
Generated Sources Location¶
| Source Set | Generated Output |
|---|---|
commonTest/ |
build/generated/fakt/commonTest/kotlin/ |
jvmTest/ |
build/generated/fakt/jvmTest/kotlin/ |
iosTest/ |
build/generated/fakt/iosTest/kotlin/ |
androidUnitTest/ |
build/generated/fakt/androidUnitTest/kotlin/ |
Next Steps¶
- Multi-Module Setup - Cross-module fakes architecture
- Usage Guide - Comprehensive usage patterns and examples
- Troubleshooting - Common configuration issues