All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.gradle.scripting.ScriptingExtension.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-RC
Show newest version
/*
 * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */

package org.jetbrains.kotlin.gradle.scripting

open class ScriptingExtension {
    internal val myScriptDefinitions = mutableListOf()
    internal val myScriptDefinitionsClasspath = mutableListOf()
    internal var myDisableScriptDefinitionsFromClasspath = false
    internal val myScriptResolverEnvironment = mutableMapOf()

    open fun scriptDefinition(fqName: String) {
        myScriptDefinitions.add(fqName)
    }

    open fun scriptDefinitions(fqNames: List) {
        myScriptDefinitions.addAll(fqNames)
    }

    open fun scriptDefinitions(vararg fqNames: String) {
        myScriptDefinitions.addAll(fqNames)
    }

    open fun scriptDefinitionsClasspath(vararg paths: String) {
        myScriptDefinitionsClasspath.addAll(paths)
    }

    open fun scriptDefinitionsClasspath(paths: List) {
        myScriptDefinitionsClasspath.addAll(paths)
    }

    open fun disableScriptDefinitionsFromClasspath(disable: Boolean) {
        myDisableScriptDefinitionsFromClasspath = disable
    }

    open fun scriptResolverEnvironment(vararg pairs: Pair) {
        myScriptResolverEnvironment.putAll(pairs)
    }

    open fun scriptResolverEnvironment(pairs: List>) {
        myScriptResolverEnvironment.putAll(pairs)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy