将我的android aar发布到jcenter

时间:2016-10-28 04:11:23

标签: android bintray jcenter

我想将我的机器人aar上传到bintray。我参考this,但当我执行cmd #gradlew bintrayUpload时,cmd显示error message,我的gradle文件如下:

bintray {
    user = properties.getProperty('bintray.user')
    key = properties.getProperty('bintray.apikey')
    configurations = ['published', 'archives']

    dryRun = false
    publish = true

    pkg {
        repo = 'maven'
        name = 'ActionAnimatorSet'

        desc = 'An animator operation set on Android'

        websiteUrl = 'https://github.com/paulyung541/ActionAnimatorSet'
        issueTrackerUrl = 'https://github.com/paulyung541/ActionAnimatorSet/issues'
        vcsUrl = 'https://github.com/paulyung541/ActionAnimatorSet.git'

        licenses = ['GNU GENERAL PUBLIC LICENSE, Version 3.0']
        labels = ['Android', 'ObjectAnimator', 'AnimatorSet']
        publicDownloadNumbers = true

        version {
            name = '1.0.0'
            desc = 'first version'
            vcsTag = '1.0'
        }
    }
}

publishing {
    publications {
        Publication(MavenPublication) {
            groupId 'com.paulyung'
            artifactId 'actionanimset'
            version '1.0.0'
        }
    }
}

我已经在bintray中设置了一个maven,但cmd总是指出我没有maven。

1 个答案:

答案 0 :(得分:1)

请查看以下某个主题: HTTP/1.1 401 Unauthorized when uploading binary on bintray Trouble Publishing Android Studio Library on jCenter with Bintray

您可能缺少userOrg参数。 这取决于你的maven repo是否属于你的组织或用户。