Search code examples
androidgradleandroid-gradle-pluginbuild.gradlejcenter

Gradle : Could not publish configuration archives


I am trying to publish my library to jcenter. But when I run

gradlew install

I get: Error installing artifact https://github.com/vishnus1224/CircularProgressIndicator:library:aar: Error installing artifact: The filename, directory name, or volume label syntax is incorrect.

The location of my library on github is here

Here is my build.gradle file

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version = "1.0"

android {
compileSdkVersion 21
buildToolsVersion "23.0.1"

defaultConfig {
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 1
    versionName version
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
       }
   }
}

def siteUrl = 'https://github.com/vishnus1224/CircularProgressIndicator'
def gitUrl = 'https://github.com/vishnus1224/CircularProgressIndicator.git'
group = "https://github.com/vishnus1224/CircularProgressIndicator"

install {
repositories.mavenInstaller {
    // This generates POM.xml with proper parameters
    pom {
        project {
            packaging 'aar'
            // Add your description here
            name 'Displays the progress in a circle with animation along with the progress percentage.'
            url siteUrl
            // Set your license
            licenses {
                license {
                    name 'MIT'
                    url 'http://opensource.org/licenses/MIT'
                }
            }
            developers {
                developer {
                    id 'vishnus1224'
                    name 'Vishnu Shirodker'
                    email 'vishnus1224@gmail.com'
                }
            }
            scm {
                connection gitUrl
                developerConnection gitUrl
                url siteUrl
               }
           }
       }
   }
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}

Properties properties = new Properties()
        properties.load(project.rootProject.file('local.properties').newDataInputStre    am())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
    repo = "maven"
    name = "CircularProgressIndicator"
    websiteUrl = siteUrl
    vcsUrl = gitUrl
    licenses = ["MIT"]
    publish = true
}
}

Please help.

Update : All I want to do is push the library to jcenter using whatever possible method.


Solution

  • Check below link. But i'm not sure whether it is useful or not.

    http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en