NavEaseExtension
Configuration block for the NavEase Gradle plugin.
navease {
// Pin a specific version instead of the plugin's bundled default
version = "0.0.3"
// Override for local monorepo development (uses project reference instead of Maven)
kspProcessorDependency = project(":navease-ksp")
runtimeDependency = project(":navease-runtime")
// Set false if you manage navease-runtime yourself
addRuntimeDependency = true
// Set false if you manage navigation3-ui yourself (e.g., to use a different version)
addNavigation3Dependency = true
// Use a specific navigation3 version (if not already declared in your project)
navigation3Dependency = "org.jetbrains.androidx.navigation3:navigation3-ui:1.2.0"
// Force NavEase's navigation3 version even if you have a different one
forceNavigation3Version = true
// Change the generated-code package (matches navease.generatedPackage KSP arg)
generatedPackage = "com.example.myapp.navigation"
}Handling Navigation3 Version Conflicts:
If you already have navigation3-ui declared:
// Scenario 1: Let Gradle handle version resolution (default)
// NavEase detects existing navigation3-ui and skips auto-injection.
// Gradle uses standard resolution (typically highest version wins).
kotlin.sourceSets.commonMain.dependencies {
implementation("org.jetbrains.androidx.navigation3:navigation3-ui:1.2.0")
}
// Scenario 2: Force NavEase's bundled version
navease {
forceNavigation3Version = true // Enforces 1.1.1 (or your custom version)
}
// Scenario 3: Use your version but let NavEase add it if missing
navease {
navigation3Dependency = "org.jetbrains.androidx.navigation3:navigation3-ui:1.2.0"
}
// Scenario 4: Manage navigation3 completely yourself
navease {
addNavigation3Dependency = false
}
kotlin.sourceSets.commonMain.dependencies {
implementation("org.jetbrains.androidx.navigation3:navigation3-ui:1.2.0")
}Properties
When true (default) the plugin adds androidx.navigation3:navigation3-ui to commonMain automatically. This is required because NavEaseRoot extends NavKey from navigation3.
When true (default) the plugin adds navease-runtime to commonMain automatically. Set to false if you manage the runtime dependency yourself.
When true, forces the NavEase-bundled navigation3-ui version using Gradle's resolution strategy, overriding any other version declared in the project. Use this if you experience version conflicts.
The Kotlin package into which KSP generates NavEase files. Leave blank to keep the default: io.github.alimsrepo.navease.generated.
Override the KSP processor dependency added to kspCommonMainMetadata.
Override the androidx.navigation3.navigation3-ui dependency added to commonMain.
Override the navease-runtime dependency added to commonMain.