Не удается опубликовать библиотеку Android в bintray

Я буквально схожу с ума, пытаясь опубликовать библиотеку в bintray.
Я следовал официальному руководству, а также нескольким учебникам, но моя библиотека так и не была загружена в bintray.
Сама библиотека работает нормально (по крайней мере, в моих тестах).

Вот файл build.gradle библиотечного модуля.
Я выполнил команды

./gradlew install

а потом

./gradlw bintrayUpload

Оба они заканчиваются надписью "СБОРКА УСПЕШНА", но на сайте bintray ничего не отображается.
Что я делаю не так?

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
//apply plugin: 'java'


def siteUrl = 'https://github.com/stefanosiano/PowerfulImageView'      // Homepage URL of the library
def gitUrl = 'https://github.com/stefanosiano/PowerfulImageView.git'   // Git repository URL
def libDescription = 'Custom Android ImageView with several added features.'
def gitTag = '0.1.1'
def pkgName = 'powerful-image-view'
def libGroupId = "com.stefanosiano"                                          // Maven Group ID for the artifact
def libArtifactId = "powerful-image-view"                                          // Maven Group ID for the artifact
def libName = "Powerful Image View"                                          // Maven Group ID for the artifact
def libVersion = "0.1.1"// This is the library version used when deploying the artifact

group = libGroupId //bintray org/group name
version = libVersion //version

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        minSdkVersion 12
        targetSdkVersion 25
        versionCode 1
        versionName libVersion
        consumerProguardFiles 'piv-proguard-rules.txt'

    }
}
dependencies {
    compile 'com.android.support:appcompat-v7:25.3.0'
}






install {
    repositories.mavenInstaller {
        // This generates POM.xml with proper parameters
        pom {
            project {
                packaging 'aar'
                groupId libGroupId
                artifactId libArtifactId

                // Add your description here
                name libName
                description libDescription
                url siteUrl

                // Set your license
                licenses {
                    license {
                        name 'MIT License'
                        url 'https://opensource.org/licenses/MIT'
                    }
                }
                developers {
                    developer {
                        id 'stefanosiano'
                        name 'Stefano Siano'
                        email '[email protected]'
                    }
                }
                scm {
                    connection gitUrl
                    developerConnection gitUrl
                    url siteUrl

                }
            }
        }
    }
}



version = libVersion

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
}




// https://github.com/bintray/gradle-bintray-plugin
bintray {
    user = System.getenv('BINTRAY_USER')
    key = System.getenv('BINTRAY_KEY')

    configurations = ['archives']

    // Package info for BinTray
    pkg {
        repo = 'maven-repo'
        // it is the name that appears in bintray when logged
        name = pkgName
        desc = libDescription
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = ['MIT']
        publish = true
        publicDownloadNumbers = true
        version {
            name = libVersion
            desc = libDescription
            released = new Date()
            vcsTag = gitTag
        }
    }
}

Вот мой файл проекта build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
// Plugin used to upload authenticated files to BinTray through Gradle
plugins {
    id "com.jfrog.bintray" version "1.7.3"
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Спасибо за любую помощь, потому что я пытаюсь с какого-то дня безуспешно :(


person Stefano Siano    schedule 26.03.2017    source источник


Ответы (1)


Хорошо, для меня проблема заключалась в том, что моя Fedora потеряла переменные среды.
После их повторного экспорта все заработало нормально.

У меня есть моя первая онлайн-библиотека! Ура!

person Stefano Siano    schedule 31.03.2017