[Kotlin Project Model] Add compiler plugin support
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright 2010-2021 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.mpp.pm20
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.project.model.*
|
||||
|
||||
/**
|
||||
* Gradle plugin that provides [KpmCompilerPlugin] from applied [Project]
|
||||
*/
|
||||
interface GradleKpmCompilerPlugin : Plugin<Project> {
|
||||
val kpmCompilerPlugin: KpmCompilerPlugin
|
||||
}
|
||||
+3
@@ -13,6 +13,7 @@ import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.gradle.plugin.HasKotlinDependencies
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
|
||||
import org.jetbrains.kotlin.project.model.KotlinModule
|
||||
import org.jetbrains.kotlin.project.model.KpmCompilerPlugin
|
||||
|
||||
interface KotlinGradleModule : KotlinModule, Named, HasKotlinDependencies {
|
||||
val project: Project
|
||||
@@ -23,6 +24,8 @@ interface KotlinGradleModule : KotlinModule, Named, HasKotlinDependencies {
|
||||
// TODO DSL & build script model: find a way to create a flexible typed view on fragments?
|
||||
override val variants: NamedDomainObjectSet<KotlinGradleVariant>
|
||||
|
||||
override val plugins: Set<KpmCompilerPlugin>
|
||||
|
||||
val isPublic: Boolean
|
||||
|
||||
fun ifMadePublic(action: () -> Unit)
|
||||
|
||||
Reference in New Issue
Block a user