【问题标题】:Could not get unknown property 'publishableFiles'无法获取未知属性 'publishableFiles'
【发布时间】:2020-08-25 01:07:29
【问题描述】:

尝试发布到 bintray 时出现以下错误。

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':bintrayUpload'.
> Could not get unknown property 'publishableFiles' for object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':bintrayPublish'.
> Could not publish 'messai/maven/kyuga/0.0.6': HTTP/1.1 404 Not Found [message:Version '0.0.6' was not found]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

我的项目是一个 kotlin 多平台项目,下面是 gradle 中的发布设置:

publishing {
    repositories {
        maven {
            url  = project.projectBintrayRepo
        }
    }

    publications {
        mavenProject(MavenPublication) {
            groupId project.groupId
            artifactId project.projectBintrayArtifactName
            version project.kyugaVersion
            withPom(pom)
        }
    }
}

请帮忙

【问题讨论】:

    标签: gradle publishing bintray kotlin-multiplatform


    【解决方案1】:
    1. 您的项目中的某些内容正在尝试从MavenPublication 获取publishableFiles 属性。如错误所示,不存在此类属性。
    2. 看起来您正在尝试发布到不存在的存储库,因此是 404 Not Found。您需要发布到存在的存储库。

    【讨论】:

      猜你喜欢
      • 2018-07-10
      • 2021-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-26
      相关资源
      最近更新 更多