使用jfrog.bintray HTTP / 1.1 404 Not Found发布库[消息:未找到Repo'']

问题描述 投票:0回答:1

今天我一直在围绕这个问题扭曲我的脑袋,似乎无法弄清楚这个设置有什么问题。我已经按照本教程,以便能够将一个安卓库上传到bintray(后来将其添加到jcenter)。以下是相关文件:

项目级build.gradle:

buildscript {
    ext.kotlin_version = '1.3.20'
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
        classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

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

库级build.gradle:

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

ext{

    bintrayRepo = "FlexibleRecyclerView"
    bintrayName = "com.tornelas.flexiblerecyclerview"

    libraryName = "flexiblerecyclerview"

    //artifact
    publishedGroupId = 'com.tornelas.flexiblerecyclerview'
    artifact = 'flexiblerecyclerview'
    libraryVersion = '0.1'

    libraryDescription = 'A recycler view where you can set the number of columns/rows and orientation on the .xml file instead of setting it on the layout manager.'
    siteUrl = ''
    gitUrl = ''
    developerId = 'tornelas'
    developerName = 'Tiago Ornelas'
    developerEmail = ''
    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.text'
    allLicenses = ['Apache-2.0']
}

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "0.1"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
}

if(project.rootProject.file('local.properties').exists()){
    apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
    apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
}

(出于隐私原因,我省略了siteUrl,gitUrl和developerEmail)

在bintray仪表板上:http://snpy.in/UwPAv5

当我运行'bintrayUpload'时,我得到以下内容:

1: Task failed with an exception.
Execution failed for task ':flexiblerecyclerview:bintrayUpload'.
> Could not create package 'tornelas/FlexibleRecyclerView/com.tornelas.flexiblerecyclerview': HTTP/1.1 404 Not Found [message:Repo 'FlexibleRecyclerView' was not found]

2: Task failed with an exception.
Execution failed for task ':bintrayPublish'.
> Could not sign version '0.1': HTTP/1.1 404 Not Found [message:Repo 'FlexibleRecyclerView' was not found]

我想知道这个问题是否正在发生,因为这个库“FlexibleRecyclerView”是组织的一部分(称为“Frontkom”)。但我无法解决这个问题。

我确定local.properties上的凭据是正确的,因为我已经使用它们的REST API进行了身份验证。

提前谢谢了!

android gradle android-gradle bintray jcenter
1个回答
0
投票

所以,问题是我试图发布到属于我的组织的存储库(即使我是该组织的所有者),我也无法在该组织之外创建回购。因此,只需添加即可

bintray {
    pkg {
        userOrg = 'myorganizationname'
    }
}

ext{}之后,我的模块的build.gradle能够成功上传。

© www.soinside.com 2019 - 2024. All rights reserved.