Introduce KotlinBasePlugin

This interface is a top-level interface for all Kotlin plugins.
Additionally it provides 'pluginVersion' property allowing to get
current applied plugin version

^KT-50869 Fixed
^KT-48008 Fixed
This commit is contained in:
Yahor Berdnikau
2022-04-12 19:56:11 +02:00
committed by Space
parent ca193a89d2
commit 5b45ea9bc9
4 changed files with 25 additions and 10 deletions
@@ -0,0 +1,18 @@
/*
* Copyright 2010-2022 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.plugin
import org.gradle.api.Plugin
import org.gradle.api.Project
/**
* Base Kotlin plugin that is responsible for creating basic build services, configurations,
* and other setup that is common for all Kotlin projects.
*/
interface KotlinBasePlugin : Plugin<Project> {
/** Gets the current version of the Kotlin Gradle plugin. */
val pluginVersion: String
}
@@ -23,9 +23,6 @@ interface KotlinJvmFactory {
/** Instance of DSL object that should be used to configure Kotlin compilation pipeline. */
val kotlinExtension: KotlinTopLevelExtensionConfig
/** Gets the current version of the Kotlin Gradle plugin. */
val pluginVersion: String
/** Creates instance of DSL object that should be used to configure JVM/android specific compilation. */
fun createKotlinJvmOptions(): KotlinJvmOptions