I made android open source library and try upload in bintray
.for this i follow this toturial but in last step for upload project i get this error :
Could not upload to 'https://api.bintray.com/content/saman/PersianDate/PersianDate/0.0.2/com/github/samanzamani/persiandate/persiandate/0.0.2/persiandate-0.0.2.pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'com/github/samanzamani/persiandate/persiandate/0.0.2/persiandate-0.0.2.pom']
buld
install.gradle file :
ext {
bintrayRepo = 'PersianDate'
bintrayName = 'PersianDate'
publishedGroupId = 'com.github.samanzamani.persiandate'
libraryName = 'PersianDate'
artifact = 'PersianDate'
libraryDescription = 'A simple jalali date converter'
siteUrl = 'https://github.com/samanzamani/PersianDate'
gitUrl = 'https://github.com/samanzamani/PersianDate.git'
libraryVersion = '0.0.2'
developerId = 'zamani'
developerName = 'Saman Zamani'
developerEmail = 'saman.zamani1@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
bintray.gradle file :
version = libraryVersion
if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
} else { // Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
userOrg=properties.getProperty("bintray.org")
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password")
name = libraryVersion
//Optional. The passphrase for GPG signing'
}
}
}
}
build.gradle file :
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: 'install.gradle'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
minSdkVersion 2
targetSdkVersion 25
versionCode 2
versionName "Alfa"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'bintray.gradle'
any idea..!?