Wasm Tools Toolchain Management Dsl
DSL for selecting and configuring the WasmToolsToolchainService used by the whole build, exposed as toolchainManagement { wasmTools { ... } } in settings.gradle.kts by the org.jetbrains.kotlin.ecosystem plugin.
At most one of toolchainService or disable may be called - the WasmToolsToolchainService is registered as a shared org.gradle.api.services.BuildService right away, under the same name every Kotlin Gradle Plugin project looks up when it registers the toolchain service for itself, so calling this more than once would silently keep only the first registration.
kotlin {
toolchainManagement {
wasmTools {
toolchainService(MyWasmToolsToolchainService::class) { //specify a service class is optional, DefaultWasmToolsToolchainService will be used by default
}
toolchainService(DefaultWasmToolsToolchainService::class) {
downloadBaseUrl("custom-url") //official wasm-tools website will be used by default
installationDir("custom location") //default <user.home>/.kotlin/toolchains/wasm-tools location will be used by default
}
toolchainService(PreInstalledWasmToolsToolchainService::class) {
wasmToolsExecutable("path_to_wasm_tools_executable") //"wasm-tools" will be used by default
}
}
}
}Note: This interface is not intended for implementation by build script or plugin authors.
Functions
Configures the built-in, download-based DefaultWasmToolsToolchainService.
Selects serviceClass as the WasmToolsToolchainService used by the whole build, and configures its parameters.
Action based version of toolchainService above.