Bintray插件似乎不包含AAR文件:错误:无法解析AAR

时间:2017-09-12 15:57:51

标签: maven android-studio android-gradle build.gradle bintray

我正在尝试使用以下构建脚本将我的库上传到Bintray。请注意,它有一个compile project(':oppwa.mobile-2.2.0')我已经下载了这个AAR文件,并作为模块依赖项添加到我的库中。当我运行./gradlew bintrayUpload - 我得到一个gradle complile line:compile 'ai.devsupport:peachpay:0.0.1'

但是,当我将此行添加到新项目时,我收到此错误:

Error:Failed to resolve: PeachPay:oppwa.mobile-2.2.0:unspecified

我的build.gradle如下:

apply plugin: 'com.jfrog.bintray'

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "http://clojars.org/repo" }
    }
    apply plugin: 'com.android.library'
    apply plugin: 'com.github.dcendents.android-maven'
}



android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    repositories {
        maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots'
        }
        maven {
            url 'https://raw.githubusercontent.com/google/keyczar/master/java/maven/'
        }
        mavenCentral()
    }

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    mavenCentral()
}

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

group = 'ai.devsupport'
version = '0.0.1'

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services-wallet:11.0.2'
    compile 'com.squareup.okhttp3:okhttp:3.8.1'
    testCompile 'junit:junit:4.12'
    compile project(':oppwa.mobile-2.2.0')
}

bintray {
    user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
    key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
    configurations = ['archives']
    pkg {
        repo = 'peachpayments'
        name = 'peachpay'
        userOrg = 'authmeio'
        licenses = ['Apache-2.0']
        vcsUrl = 'https://github.com/shardullavekar/peachpay.git'
        version {
            name = '0.0.1'
            desc = 'Peach Payments library powered by Devsupport AI'
            vcsTag = '0.0.1'
            attributes = ['gradle-plugin': 'ai.devsupport:peachpay:0.0.1']
        }
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.4'
}

我的项目结构如下:

enter image description here

有任何帮助吗?问题是Bintray不会抛出任何错误 - 这会造成混乱。

0 个答案:

没有答案