Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove workaround for pre Kotlin 1.4.30 MPP projects #302

Merged
merged 2 commits into from
Sep 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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