[Gradle] Add withSourcesJar to gradle dsl

* Each target can be configured to either publish or not its sources.
* For convenience withSourcesJar available also on kotlin multiplatform
  extension level. It then calls `withSourcesJar` for each target.

^KT-55881 In Progress
This commit is contained in:
Anton Lakotka
2023-02-08 19:51:53 +01:00
committed by Space Team
parent 4060cc2750
commit 1b3b83755e
4 changed files with 16 additions and 0 deletions
@@ -38,6 +38,8 @@ interface KotlinTarget : Named, HasAttributes {
val publishable: Boolean
fun withSourcesJar(publish: Boolean = true)
val components: Set<SoftwareComponent>
fun mavenPublication(action: MavenPublication.() -> Unit) = mavenPublication(Action { action(it) })