[Gradle, MPP] Publish sources as gradle variants
Now when MPP library is published it will contain "sourcesElements" variant for each target and one for common code. Sources variants are published under gradle attributes that were borrowed from Java Gradle Plugin for consistency reasons. This makes it compatible with JVM tooling that rely on these attributes. ^KT-36943 Verification Pending
This commit is contained in:
+1
@@ -34,6 +34,7 @@ interface KotlinTarget : Named, HasAttributes {
|
||||
val defaultConfigurationName: String
|
||||
val apiElementsConfigurationName: String
|
||||
val runtimeElementsConfigurationName: String
|
||||
val sourcesElementsConfigurationName: String
|
||||
|
||||
val publishable: Boolean
|
||||
|
||||
|
||||
+6
@@ -13,5 +13,11 @@ interface KotlinTargetComponent : SoftwareComponent {
|
||||
val publishable: Boolean
|
||||
val publishableOnCurrentHost: Boolean
|
||||
val defaultArtifactId: String
|
||||
|
||||
@Deprecated(
|
||||
message = "Sources artifacts are now published as separate variant " +
|
||||
"use target.sourcesElementsConfigurationName to obtain necessary information",
|
||||
replaceWith = ReplaceWith("target.sourcesElementsConfigurationName")
|
||||
)
|
||||
val sourcesArtifacts: Set<PublishArtifact>
|
||||
}
|
||||
Reference in New Issue
Block a user