[Gradle] Move more task inputs to properties
... move more configuration logic to TaskConfigAction classes. This is to avoid directly accessing tasks to configure them. The TaskConfigAction objects should eventually have access to all information that is required to configure the task, and they should compute the final values of all properties. This will also allow 3P plugins to configure Kotlin tasks, without the need to create KGP internal objects. ^KT-50869 In Progress
This commit is contained in:
+2
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.gradle.plugin
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.Internal
|
||||
import java.io.File
|
||||
|
||||
open class SubpluginOption(val key: String, private val lazyValue: Lazy<String>) {
|
||||
@@ -64,6 +65,7 @@ open class InternalSubpluginOption(key: String, value: String) : SubpluginOption
|
||||
|
||||
/** Keeps one or more compiler options for one of more compiler plugins. */
|
||||
open class CompilerPluginConfig {
|
||||
@get:Internal
|
||||
protected val optionsByPluginId = mutableMapOf<String, MutableList<SubpluginOption>>()
|
||||
|
||||
fun allOptions(): Map<String, List<SubpluginOption>> = optionsByPluginId
|
||||
|
||||
Reference in New Issue
Block a user