# JvmToolchainManagement

@Incubating
@ServiceScope(value = Build::class)
interface JvmToolchainManagement(source)

Dynamic extension added to `ToolchainManagement` at runtime, by the `jvm-toolchain-management` plugin. Provides a `jvm` block to configure the ordered list of Java toolchain repositories to use for auto-provisioning.

#### Since

7.6

## Functions

getJavaRepositories
Link copied to clipboard
abstract fun getJavaRepositories(): JavaToolchainRepositoryHandler
Returns the handler for the ordered list of configured `JavaToolchainRepository` implementations.
javaRepositories
Link copied to clipboard
abstract fun javaRepositories(configureAction: Action<in JavaToolchainRepositoryHandler>)
org.gradle.api.NamedDomainObjectList based handler for configuring an ordered collection of Java toolchain repositories:

    toolchainManagement {
        jvm {
            javaRepositories {
                repository('registry1') {
                    resolverClass = com.example.CustomToolchainRegistry1
                    credentials {
                        username = "user"
                        password = "password"
                    }
                    authentication {
                        digest(BasicAuthentication)
                    }
                }
                repository('registry2') {
                    resolverClass = com.example.CustomToolchainRegistry2
                }
            }
        }

Content copied to clipboard