gpt4 book ai didi

android - 无法在 jitpack 上发布

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:41:20 29 4
gpt4 key购买 nike

我在发布 multi-flavor 时遇到问题 library去拼包。日志显示构建成功但状态为错误

enter image description here

我已经按照 jitpack 网站上的说明进行操作,但他们的示例使用旧的 gradle 版本并且它不适用于 gradle 4.4

这是日志:

Build starting...
Start: Fri Apr 20 07:35:56 UTC 2018
Git:
1.28.1-1-g932f4d8
commit 932f4d88e13b1c8c52b4dbae8c203e7d52a0eadf
Author: yzheka
Date: Fri Apr 20 10:34:49 2018 +0300

jitpack config


Run gradle build
Gradle build script
Found gradle version: 4.4.
Using gradle wrapper
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djavax.xml.accessExternalSchema=all
Downloading https://services.gradle.org/distributions/gradle-4.4-all.zip
..............................................................................................
Unzipping /home/jitpack/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4-all.zip to /home/jitpack/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1
Set executable permissions for: /home/jitpack/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4/bin/gradle

------------------------------------------------------------
Gradle 4.4
------------------------------------------------------------

Build time: 2017-12-06 09:05:06 UTC
Revision: cf7821a6f79f8e2a598df21780e3ff7ce8db2b82

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_131 (Oracle Corporation 25.131-b11)
OS: Linux 4.14.15-xxxx-std-ipv6-64 amd64

0m4.923s
Getting a list of gradle tasks
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djavax.xml.accessExternalSchema=all
Running: ./gradlew clean -Pgroup=com.github.yzheka -Pversion=-1.28.1-g932f4d8-1 -xtest -xlint install
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djavax.xml.accessExternalSchema=all
:clean
:app:clean UP-TO-DATE
:busybox:clean UP-TO-DATE
:busybox:install

BUILD SUCCESSFUL in 0s
4 actionable tasks: 2 executed, 2 up-to-date
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djavax.xml.accessExternalSchema=all
EXIT_CODE=0
2018-04-20T07:36:32.030445377Z
Exit code: 0
No build artifacts found

最佳答案

在 jitpack 日志中你可以看到为什么 jitpack 不能发布你的库。由于 jitpack 错误,只需删除部分代码即可。

Cannot get the value of write-only property 'publishNonDefault' for object of type com.android.build.gradle.LibraryExtension.

if( android.publishNonDefault && variant.name == android.defaultPublishConfig ) {
def bundleTask = tasks["bundle${name.capitalize()}"]
artifacts {
archives(bundleTask.archivePath) {
classifier null
builtBy bundleTask
}
}
}
}
}

然后 jitpack 在发布你的库时不会显示错误。奇迹般有效。要再次发布您的库,请再次发布您的库。

我只是为您做的作为示例,请参阅我在这里从您那里 fork 的存储库 https://github.com/markizdeviler/Busybox

关于android - 无法在 jitpack 上发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49936617/

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