1

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.

vishnus
  • 728
  • 2
  • 7
  • 20
  • check [this](http://stackoverflow.com/questions/21066598/android-studio-0-4-2-gradle-project-sync-failed-error) link – pRaNaY Oct 11 '15 at 07:16
  • Packaging 'aar' ? Don't you mean jar? – James Oct 11 '15 at 17:46
  • The code on Github doesn't seem to be uptodate with the file above; Could it be that you have something in some other grader configuration file? – James Oct 11 '15 at 17:55
  • the other gradle file is for the example project. This is the main one for the library project. I have followed this tutorial https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/ – vishnus Oct 12 '15 at 05:12

1 Answers1

0

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

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
preethi
  • 222
  • 2
  • 12