Don't configure runtimeDependencyFiles during variant instantiation
This commit is contained in:
+6
-4
@@ -98,10 +98,12 @@ abstract class KotlinGradleVariantWithRuntimeInternal(
|
|||||||
|
|
||||||
override lateinit var runtimeDependencyFiles: FileCollection
|
override lateinit var runtimeDependencyFiles: FileCollection
|
||||||
|
|
||||||
override val runtimeFiles: ConfigurableFileCollection = project.files(
|
override val runtimeFiles: ConfigurableFileCollection by lazy {
|
||||||
{ compilationOutputs.allOutputs },
|
project.files(
|
||||||
{ runtimeDependencyFiles }
|
{ compilationOutputs.allOutputs },
|
||||||
)
|
{ runtimeDependencyFiles }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// TODO generalize exposing outputs: what if a variant has more than one such configurations or none?
|
// TODO generalize exposing outputs: what if a variant has more than one such configurations or none?
|
||||||
override val runtimeElementsConfigurationName: String
|
override val runtimeElementsConfigurationName: String
|
||||||
|
|||||||
+4
-12
@@ -210,15 +210,6 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments> : AbstractKotl
|
|||||||
protected val multiModuleICSettings: MultiModuleICSettings
|
protected val multiModuleICSettings: MultiModuleICSettings
|
||||||
get() = MultiModuleICSettings(buildHistoryFile.get().asFile, useModuleDetection.get())
|
get() = MultiModuleICSettings(buildHistoryFile.get().asFile, useModuleDetection.get())
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
@get:InputFiles
|
|
||||||
@get:Classpath
|
|
||||||
open val pluginClasspath: FileCollection by project.provider {
|
|
||||||
(taskData.compilation as? KotlinCompilation<*>?)?.pluginConfigurationName?.let(project.configurations::getByName)
|
|
||||||
?: project.files()
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@get:InputFiles
|
@get:InputFiles
|
||||||
@get:Classpath
|
@get:Classpath
|
||||||
open val pluginClasspath: ConfigurableFileCollection = objects.fileCollection()
|
open val pluginClasspath: ConfigurableFileCollection = objects.fileCollection()
|
||||||
@@ -234,6 +225,7 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments> : AbstractKotl
|
|||||||
*/
|
*/
|
||||||
@get:Optional
|
@get:Optional
|
||||||
@get:Nested
|
@get:Nested
|
||||||
|
// TODO: replace with objects.property and introduce task configurator
|
||||||
internal var kotlinPluginData: Provider<KotlinCompilerPluginData>? = null
|
internal var kotlinPluginData: Provider<KotlinCompilerPluginData>? = null
|
||||||
|
|
||||||
// Input is needed to force rebuild even if source files are not changed
|
// Input is needed to force rebuild even if source files are not changed
|
||||||
@@ -385,9 +377,9 @@ open class KotlinCompileArgumentsProvider<T : AbstractKotlinCompile<out CommonCo
|
|||||||
val coroutines: Provider<Coroutines> = taskProvider.coroutines
|
val coroutines: Provider<Coroutines> = taskProvider.coroutines
|
||||||
val logger: Logger = taskProvider.logger
|
val logger: Logger = taskProvider.logger
|
||||||
val isMultiplatform: Boolean = taskProvider.multiPlatformEnabled.get()
|
val isMultiplatform: Boolean = taskProvider.multiPlatformEnabled.get()
|
||||||
val pluginData = taskProvider.kotlinPluginData?.orNull
|
private val pluginData = taskProvider.kotlinPluginData?.orNull
|
||||||
val pluginClasspath: FileCollection = taskProvider.pluginClasspath // TODO: Add pluginData
|
val pluginClasspath: FileCollection = listOfNotNull(taskProvider.pluginClasspath, pluginData?.classpath).reduce(FileCollection::plus)
|
||||||
val pluginOptions: CompilerPluginOptions = taskProvider.pluginOptions // TODO: Add pluginData
|
val pluginOptions: CompilerPluginOptions = listOfNotNull(taskProvider.pluginOptions, pluginData?.options).reduce(CompilerPluginOptions::plus)
|
||||||
}
|
}
|
||||||
|
|
||||||
class KotlinJvmCompilerArgumentsProvider
|
class KotlinJvmCompilerArgumentsProvider
|
||||||
|
|||||||
Reference in New Issue
Block a user