无法获得未知属性'publishableFiles'。

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

我在尝试发布到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
投票
  1. 在你的项目中,有一些东西正试图获得一个 publishableFiles 产自 MavenPublication. 正如错误所显示的,不存在这样的属性。
  2. 看起来你试图发布到一个不存在的版本库,因此出现了 404 Not Found. 你需要发布到一个存在的存储库。
© www.soinside.com 2019 - 2024. All rights reserved.