forked from kscience/kmath
Build fix for deploy
This commit is contained in:
parent
11bbdce94b
commit
d4cd4fd426
@ -1,3 +1,7 @@
|
|||||||
|
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
|
||||||
|
import org.gradle.api.publish.maven.internal.artifact.FileBasedMavenArtifact
|
||||||
|
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
@ -80,3 +84,20 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//workaround for bintray and artifactory
|
||||||
|
project.tasks.filter { it is ArtifactoryTask || it is BintrayUploadTask }.forEach {
|
||||||
|
it.doFirst {
|
||||||
|
project.configure<PublishingExtension> {
|
||||||
|
publications.filterIsInstance<MavenPublication>()
|
||||||
|
.forEach { publication ->
|
||||||
|
val moduleFile = project.buildDir.resolve("publications/${publication.name}/module.json")
|
||||||
|
if (moduleFile.exists()) {
|
||||||
|
publication.artifact(object : FileBasedMavenArtifact(moduleFile) {
|
||||||
|
override fun getDefaultExtension() = "module"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -93,22 +93,6 @@ bintray {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//workaround for bintray
|
|
||||||
tasks.withType<BintrayUploadTask> {
|
|
||||||
doFirst {
|
|
||||||
publishing.publications
|
|
||||||
.filterIsInstance<MavenPublication>()
|
|
||||||
.forEach { publication ->
|
|
||||||
val moduleFile = buildDir.resolve("publications/${publication.name}/module.json")
|
|
||||||
if (moduleFile.exists()) {
|
|
||||||
publication.artifact(object : FileBasedMavenArtifact(moduleFile) {
|
|
||||||
override fun getDefaultExtension() = "module"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
artifactory {
|
artifactory {
|
||||||
val artifactoryUser: String? by project
|
val artifactoryUser: String? by project
|
||||||
val artifactoryPassword: String? by project
|
val artifactoryPassword: String? by project
|
||||||
|
Loading…
Reference in New Issue
Block a user