Configuration
Most applications should begin with:
kanvas {
target = ":desktop"
backend = "auto"
}
Leave backend = "auto", takeover = true, capture = true, and audit = true at their defaults until the basic integration works. Override individual pieces when you are debugging a specific layer.
Plugin options
target
Selects the Gradle project containing the application tasks.
target = ":desktop"
target = ":app"
target = ":"
backend
Selects the native rendering backend.
auto
vulkan
metal
opengl
d3d9
gdi
strictRenderer
strictRenderer = true
Development/verification mode. Unsupported primary-frame operations fail clearly instead of being hidden.
Use strictRenderer = true when validating renderer ownership or adding new rendering support. It can turn fallback behavior into an explicit failure so unsupported operations do not look like successful Kanvas rendering.
takeover
takeover = true
Controls whether Kanvas attempts renderer takeover.
capture
capture = true
Enables Compose/Skia capture support.
Capture observes and lowers renderer work. Takeover controls whether Kanvas owns final presentation. Keeping them separate is useful when debugging integration and compatibility.
audit
audit = true
Enables renderer ownership/audit diagnostics.
autoBuildRuntime
autoBuildRuntime = true
Allows Kanvas to build/provision the host native runtime automatically.
Task overrides
Kanvas normally detects useful application tasks. Unusual projects can override them:
kanvas {
buildTask = ":desktop:build"
runTask = ":desktop:run"
packageTask = ":desktop:createDistributable"
}
Runtime/source overrides
kanvas {
home = ""
sourceUrl = "https://github.com/Yuries-Public-Stuff/Kanvas.git"
sourceRef = ""
agentJar = ""
nativeLibrary = ""
runtimeBuildType = "Release"
}
When a released plugin provisions from source and sourceRef is blank, Kanvas resolves the matching vX.Y.Z source tag. This keeps the Gradle plugin, Java agent, JNI protocol, and native runtime on the same release line.