I’m trying to publish mpp library with bintray. I did similar steps like I usualy do with android library. What I done:
- Created new package in bintray.
- Build project, and have done bintrayUpload.
My gradle bintray script:
apply plugin: 'com.jfrog.bintray'
group = publishedGroupId
version = libraryVersion
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def bintrayUser = properties.getProperty("bintray.user")
def bintrayApiKey = properties.getProperty("bintray.apikey")
def bintrayPassword = properties.getProperty("bintray.gpg.password")
afterEvaluate {
project.publishing.publications.all {
groupId = publishedGroupId
if (it.name.contains('metadata')) {
artifactId = "$artifact"
} else {
artifactId = "$artifact-$name"
}
}
bintray {
user = bintrayUser
key = bintrayApiKey
pkg {
repo = bintrayRepo
name = bintrayName
userOrg = developerOrg
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true
passphrase = bintrayPassword
}
}
}
bintrayUpload.doFirst {
publications = publishing.publications.collect {
it.name
}.findAll {
it != "kotlinMultiplatform"
}
}
bintrayUpload.dependsOn publishToMavenLocal
- Tried to add this library to JCenter from bintray. And it is failed with message “Path is already exist in JCenter. POM project file is not valid.”
But the truth is that it is not added to JCenter and I cannot use it in another mpp project.