Fixes for review KOTLIN-CR-2599

* Move source artifacts to KotlinVariant classes (since joint Android
 variants may have multiple source artifacts, make it a set)

* Change lowerSpinalCaseName to dashSeparatedName (doesn't transform
 the strings to lower case inside)

* Don't transform the project name to lower case (in the future, it may
 be reasonable to stop transforming the target and component names, too)
 Still transform the target names and the component names.
 Currently, this is the way we don't break existing publications and may
 still reconsider this in the future.

* Add a workaround for a list of GString's assigned to
 publishLibraryVariants

* Check for Android library variants existence in a more strict way,
 report existing variants that are not library variants.
This commit is contained in:
Sergey Igushkin
2019-01-11 17:17:56 +03:00
parent 7e6527ca65
commit 8bc7ac32f3
8 changed files with 82 additions and 63 deletions
@@ -10,6 +10,7 @@ import org.gradle.api.Action
import org.gradle.api.Named
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.artifacts.PublishArtifact
import org.gradle.api.attributes.AttributeContainer
import org.gradle.api.attributes.HasAttributes
import org.gradle.api.component.SoftwareComponent
@@ -21,6 +22,7 @@ interface KotlinTargetComponent : SoftwareComponent {
val target: KotlinTarget
val publishable: Boolean
val defaultArtifactId: String
val sourcesArtifacts: Set<PublishArtifact>
}
interface KotlinTarget : Named, HasAttributes {