Bintrayに防ぐアップロードの追加「アプリ-unspecified.aar」

Chathura Buddhika:

私はAndroidのライブラリを作成し、Bintrayリポジトリに公開しようとしています。実行中でもbintrayUploadGradleのタスクを、オリジナルのアーティファクトと一緒にBintrayにアップロードされた「APP-unspecified.aar」と呼ばれる追加のファイルがあります。

ここでは、画像の説明を入力します。

publish.gradle

apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

publishing {
    publications {
        library(MavenPublication) {
            groupId publishGroupId
            artifactId publishArtifactId
            version android.defaultConfig.versionName

            pom {
                name = publishArtifactId
                description = libraryDescription
                withXml {
                    def dependenciesNode = asNode().appendNode('dependencies')
                    configurations.implementation.allDependencies.each {
                        if (it.name != 'unspecified') {
                            def dependencyNode = dependenciesNode.appendNode('dependency')
                            dependencyNode.appendNode('groupId', it.group)
                            dependencyNode.appendNode('artifactId', it.name)
                            dependencyNode.appendNode('version', it.version)
                        }
                    }
                }
            }
        }
    }
}

def _user = System.getenv("BINTRAY_USER")
def _key =  System.getenv("BINTRAY_API_KEY")

if(project.rootProject.file('local.properties').exists() && (_user == null || _user.isEmpty())){
    Properties properties = new Properties()
    properties.load(project.rootProject.file('local.properties').newDataInputStream())
    _user = properties.getProperty("bintray.user")
    _key = properties.getProperty("bintray.apikey");
}

bintray {
    user = _user
    key = _key
    override = true
    publications = ['library']
    configurations = ['archives']
    pkg {
        repo = bitrayRepo
        name = bintrayPackage
        desc = libraryDescription
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = allLicenses
        publish = true
        publicDownloadNumbers = true
        version {
            name = android.defaultConfig.versionName
            released = new Date()
            vcsTag = android.defaultConfig.versionName
        }
    }
}

私が実行したときにgradle bintrayUpload、私は、出力に次のようになっています。

> Task :app:bintrayUpload
Uploading to https://api.bintray.com/content/chathurabuddi/android/datetime-picker-wheel/0.0.1/datetime-picker-wheel/app/unspecified/app-unspecified.aar...
Uploaded to 'https://api.bintray.com/content/chathurabuddi/android/datetime-picker-wheel/0.0.1/datetime-picker-wheel/app/unspecified/app-unspecified.aar'.
Uploading to https://api.bintray.com/content/chathurabuddi/android/datetime-picker-wheel/0.0.1/lk/chathurabuddi/datetime-picker-wheel/0.0.1/datetime-picker-wheel-0.0.1.aar...
Uploaded to 'https://api.bintray.com/content/chathurabuddi/android/datetime-picker-wheel/0.0.1/lk/chathurabuddi/datetime-picker-wheel/0.0.1/datetime-picker-wheel-0.0.1.aar'.
Uploading to https://api.bintray.com/content/chathurabuddi/android/datetime-picker-wheel/0.0.1/lk/chathurabuddi/datetime-picker-wheel/0.0.1/datetime-picker-wheel-0.0.1.pom...
Uploaded to 'https://api.bintray.com/content/chathurabuddi/android/datetime-picker-wheel/0.0.1/lk/chathurabuddi/datetime-picker-wheel/0.0.1/datetime-picker-wheel-0.0.1.pom'.

どのように私はBintrayにその追加のアーティファクトをアップロード防ぐことができますか?

Chathuri Buddika:

あなたが宣言されているのでpublications、それは追加する必要はありませんconfigurations = ['archives']ラインを。あなたからそれを削除してくださいpublish.gradleファイル

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=20251&siteId=1