如何从 Jenkins 创建 aab 而不是 apk

How to create aab instead of apk from Jenkins

我想将我的个人应用程序配置为构建为 android 应用程序包而不是 Jenkins 中的 apk。如何配置我的 Jenkins 来构建 aab 而不是 apk

您需要 BundleTool 您可以使用 bundletool 创建 aab 并对其签名甚至测试。 您可以像安装另一个 CLI 实用程序一样安装 Bundletool,并在 Jenkins.

中执行命令

或者您可以只执行 Gradle 任务,例如 bundleRelease 来生成您的发布 aab。

Here 详细介绍了如何操作。

https://developer.android.com/studio/build/building-cmdline#bundletool-build https://developer.android.com/studio/command-line/bundletool