Skip to main content

Configuration

Most applications should begin with:

kanvas {
target = ":desktop"
backend = "auto"
}
Start small

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.

Strict mode is intentionally unforgiving

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 is not the same as takeover

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"
}
Release/runtime matching

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.