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