Allow resolution for compileOnly and compileClasspath configurations

This is required by the old IDE importer, which needs to resolve these configurations, and there seems to be no easy way to prevent that.
This commit is contained in:
Sergey Igushkin
2018-07-25 11:22:33 +03:00
parent 19fd706d98
commit 1e95e4d427
@@ -295,7 +295,8 @@ open class KotlinTargetConfigurator(
usesPlatformOf(target)
isVisible = false
isCanBeConsumed = false
isCanBeResolved = false
isCanBeResolved = true // Needed for IDE import
attributes.attribute(USAGE_ATTRIBUTE, compilation.target.project.usageByName(Usage.JAVA_API)) // API usage for IDE import
description = "Dependencies for $compilation (deprecated, use '${compilation.implementationConfigurationName} ' instead)."
}
@@ -321,7 +322,8 @@ open class KotlinTargetConfigurator(
usesPlatformOf(target)
isVisible = false
isCanBeConsumed = false
isCanBeResolved = false
isCanBeResolved = true // Needed for IDE import
attributes.attribute(USAGE_ATTRIBUTE, compilation.target.project.usageByName(Usage.JAVA_API)) // API usage for IDE import
description = "Compile only dependencies for $compilation."
}