Skip to content

Commit

Permalink
remove workaround for pre Kotlin 1.4.30 MPP projects (#302)
Browse files Browse the repository at this point in the history
* remove workaround for pre Kotlin 1.4.30 MPP projects

* ktlint
  • Loading branch information
gabrielittner authored Sep 12, 2021
1 parent 41f86a6 commit 0a60967
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.vanniktech.maven.publish

import com.vanniktech.maven.publish.tasks.JavadocJar.Companion.javadocJarTask
import com.vanniktech.maven.publish.tasks.SourcesJar.Companion.androidSourcesJar
import com.vanniktech.maven.publish.tasks.SourcesJar.Companion.emptySourcesJar
import com.vanniktech.maven.publish.tasks.SourcesJar.Companion.javaSourcesJar
import com.vanniktech.maven.publish.tasks.SourcesJar.Companion.kotlinSourcesJar
import org.gradle.api.Project
Expand Down Expand Up @@ -142,14 +141,6 @@ data class KotlinMultiplatform @JvmOverloads constructor(

project.gradlePublishing.publications.withType(MavenPublication::class.java).all {
it.withJavadocJar { javadocJarTask }

// On Kotlin versions before 1.4.30 sources jars are only created for platforms, not the common artifact.
if (it.name == "kotlinMultiplatform") {
val sourceArtifact = it.artifacts.find { artifact -> artifact.classifier == "sources" }
if (sourceArtifact == null) {
it.withSourcesJar { project.emptySourcesJar() }
}
}
}
}
}
Expand Down

0 comments on commit 0a60967

Please sign in to comment.