Add a final override for project in KotlinGradleFragmentInternal
This commit is contained in:
+5
-2
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.gradle.plugin.mpp.pm20
|
||||
|
||||
import groovy.lang.Closure
|
||||
import org.gradle.api.NamedDomainObjectProvider
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.file.SourceDirectorySet
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.util.ConfigureUtil
|
||||
@@ -30,6 +31,9 @@ open class KotlinGradleFragmentInternal @Inject constructor(
|
||||
|
||||
override fun getName(): String = fragmentName
|
||||
|
||||
final override val project: Project // overriding with final to avoid warnings
|
||||
get() = super.project
|
||||
|
||||
// TODO pull up to KotlinModuleFragment
|
||||
// FIXME apply to compilation
|
||||
// FIXME check for consistency
|
||||
@@ -85,11 +89,10 @@ open class KotlinGradleFragmentInternal @Inject constructor(
|
||||
override val declaredModuleDependencies: Iterable<KotlinModuleDependency>
|
||||
get() = project.configurations.getByName(apiConfigurationName).allDependencies.map { it.toModuleDependency(project) } // FIXME impl
|
||||
|
||||
override val kotlinSourceRoots: SourceDirectorySet by lazy {
|
||||
override val kotlinSourceRoots: SourceDirectorySet =
|
||||
project.objects.sourceDirectorySet(
|
||||
"$fragmentName.kotlin", "Kotlin sources for fragment $fragmentName"
|
||||
)
|
||||
}
|
||||
|
||||
override val transitiveApiConfigurationName: String
|
||||
get() = disambiguateName("transitiveApi")
|
||||
|
||||
-3
@@ -27,9 +27,6 @@ abstract class KotlinGradleVariantInternal(
|
||||
override val fragmentName: String
|
||||
) : KotlinGradleFragmentInternal(containingModule, fragmentName), KotlinGradleVariant {
|
||||
|
||||
final override val project: Project // overriding with final to avoid warnings
|
||||
get() = super<KotlinGradleFragmentInternal>.project
|
||||
|
||||
override val variantAttributes: Map<KotlinAttributeKey, String>
|
||||
get() = mapOf(KotlinPlatformTypeAttribute to kotlinPlatformTypeAttributeFromPlatform(platformType)) // TODO user attributes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user