Fixed mpp deploy to artifactory
This commit is contained in:
parent
4ae1f71a05
commit
535e877eb0
@ -5,6 +5,7 @@ import groovy.lang.GroovyObject
|
||||
import org.gradle.api.publish.maven.internal.artifact.FileBasedMavenArtifact
|
||||
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
|
||||
import org.jfrog.gradle.plugin.artifactory.dsl.ResolverConfig
|
||||
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask
|
||||
|
||||
// Old bintray.gradle script converted to real Gradle plugin (precompiled script plugin)
|
||||
// It now has own dependencies and support type safe accessors
|
||||
@ -134,3 +135,19 @@ artifactory {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Fixed module artifact uploading to artifactory
|
||||
tasks.withType<ArtifactoryTask> {
|
||||
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"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user