gpt4 book ai didi

c++ - 将 C++ cmake-library 构建发布到本地 repo 时出现 Gradle 错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:30:03 25 4
gpt4 key购买 nike

尝试发布示例 cmake-library项目到本地 repo 。尝试使用 maven-publish 插件和 org.gradle.samples.custom-publication 但都失败了。

预期行为

期待 cmake 特定库(列表)成功发布到本地目录 repo。

当前行为

Execution failed for task ':list:generateMetadataFileForMainPublication'.
Invalid publication 'main':
- Variants 'debugLink' and 'releaseLink' have the same attributes and capabilities.
Please make sure either attributes or capabilities are different.
- Variants 'debugRuntime' and 'releaseRuntime' have the same attributes and
capabilities. Please make sure either attributes or capabilities are different.

上下文

我想做的是将我们当前的 c++ 第三方依赖项(主要使用 cmake)发布到任何 gradle 兼容的存储库,以便我们的主 c++ 项目或任何其他项目可以使用它。

重现步骤(针对错误)

只需在 cmake-library 中启动发布命令根

./gradlew publish

环境

最佳答案

这已在 gradle native 示例存储库的最新提交中修复。你可以看到 reply .只需拉取最新的提交!!

关于c++ - 将 C++ cmake-library 构建发布到本地 repo 时出现 Gradle 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59027902/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com