Don't add Kotlin specific attributes to legacy 'default' configuration
^KT-51913 Fixed
This commit is contained in:
@@ -267,10 +267,13 @@ fun Project.reconfigureMainSourcesSetForGradlePlugin(
|
||||
wireGradleVariantToCommonGradleVariant(this, commonSourceSet)
|
||||
|
||||
// https://youtrack.jetbrains.com/issue/KT-51913
|
||||
configurations["default"].attributes.attribute(
|
||||
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
|
||||
objects.named(TargetJvmEnvironment::class, "no-op")
|
||||
)
|
||||
// Remove workaround after bootstrap update
|
||||
if (configurations["default"].attributes.contains(TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE)) {
|
||||
configurations["default"].attributes.attribute(
|
||||
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
|
||||
objects.named(TargetJvmEnvironment::class, "no-op")
|
||||
)
|
||||
}
|
||||
|
||||
plugins.withType<JavaLibraryPlugin>().configureEach {
|
||||
this@reconfigureMainSourcesSetForGradlePlugin
|
||||
|
||||
-4
@@ -522,10 +522,6 @@ internal abstract class AbstractKotlinPlugin(
|
||||
// Setup the consuming configurations:
|
||||
project.dependencies.attributesSchema.attribute(KotlinPlatformType.attribute)
|
||||
|
||||
project.configurations.getByName("default").apply {
|
||||
setupAsLocalTargetSpecificConfigurationIfSupported(kotlinTarget)
|
||||
}
|
||||
|
||||
// Setup the published configurations:
|
||||
// Don't set the attributes for common module; otherwise their 'common' platform won't be compatible with the one in
|
||||
// platform-specific modules
|
||||
|
||||
Reference in New Issue
Block a user