Dagger
Search

codemagic-cli-tools

Builds a small image with codemagic-cli-tools, a jlink'ed Java runtime (java,
keytool, jarsigner), a pinned bundletool and git, and exposes typed wrappers
for the Android-related tools: google-play, android-app-bundle,
android-keystore, universal-apk and git-changelog. Secrets (keystore
passwords, Google Play service account credentials) are always passed as
Dagger secrets and handed to the CLI via environment variables
("@env:" argument references), never as plain command-line arguments.

Versions are pinned to sensible defaults and can be overridden with the
With*Version chaining functions.

Installation

dagger install github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483

Entrypoint

Return Type
CodemagicCliTools !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
func (m *MyModule) Example() *dagger.CodemagicCliTools  {
	return dag.
			Codemagicclitools()
}
@function
def example() -> dagger.CodemagicCliTools:
	return (
		dag.codemagic_cli_tools()
	)
@func()
example(): CodemagicCliTools {
	return dag
		.codemagicCliTools()
}

Types

CodemagicCliTools 🔗

codemagicVersion() 🔗

codemagic-cli-tools version from PyPI (e.g. “0.70.0”).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 codemagic-version
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Codemagicversion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.codemagicversion()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.codemagicVersion()
}

bundletoolVersion() 🔗

bundletool version from google/bundletool GitHub releases (e.g. “1.18.3”).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 bundletool-version
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Bundletoolversion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.bundletoolversion()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.bundletoolVersion()
}

pythonVersion() 🔗

Python version used for the python:-slim-trixie base image (e.g. “3.13”).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 python-version
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Pythonversion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.pythonversion()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.pythonVersion()
}

javaVersion() 🔗

Eclipse Temurin JDK major version used to jlink the Java runtime (e.g. “21”).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 java-version
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Javaversion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.javaversion()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.javaVersion()
}

androidAppBundle() 🔗

AndroidAppBundle returns an android-app-bundle wrapper operating on the given .aab file.

Return Type
CodemagicCliToolsAndroidAppBundle !
Arguments
NameTypeDefault ValueDescription
bundleFile !-

Android App Bundle (.aab).

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path
func (m *MyModule) Example(bundle *dagger.File) *dagger.CodemagicCliToolsAndroidAppBundle  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle)
}
@function
def example(bundle: dagger.File) -> dagger.CodemagicCliToolsAndroidAppBundle:
	return (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
	)
@func()
example(bundle: File): CodemagicCliToolsAndroidAppBundle {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
}

androidKeystore() 🔗

AndroidKeystore returns an android-keystore wrapper for the given keystore.

Return Type
CodemagicCliToolsAndroidKeystore !
Arguments
NameTypeDefault ValueDescription
keystoreFile !-

Keystore file (.jks / .keystore).

keystorePasswordSecret !-

Keystore password.

keyAliasString !-

Alias of the key to inspect.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-keystore --keystore file:path --keystore-password env:MYSECRET --key-alias string
func (m *MyModule) Example(keystore *dagger.File, keystorePassword *dagger.Secret, keyAlias string) *dagger.CodemagicCliToolsAndroidKeystore  {
	return dag.
			Codemagicclitools().
			Androidkeystore(keystore, keystorePassword, keyAlias)
}
@function
def example(keystore: dagger.File, keystorepassword: dagger.Secret, keyalias: str) -> dagger.CodemagicCliToolsAndroidKeystore:
	return (
		dag.codemagic_cli_tools()
		.androidkeystore(keystore, keystorepassword, keyalias)
	)
@func()
example(keystore: File, keystorePassword: Secret, keyAlias: string): CodemagicCliToolsAndroidKeystore {
	return dag
		.codemagicCliTools()
		.androidKeystore(keystore, keystorePassword, keyAlias)
}

bundletoolInfo() 🔗

BundletoolInfo returns the bundletool and Java paths/version used by codemagic as JSON (android-app-bundle bundletool info --json).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 bundletool-info
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Bundletoolinfo(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.bundletoolinfo()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.bundletoolInfo()
}

container() 🔗

Container returns the codemagic-cli-tools container.

Contents: python:-slim-trixie, codemagic-cli-tools==, a jlink’ed Temurin runtime (java, keytool, jarsigner) at /opt/java, bundletool at /opt/bundletool/bundletool.jar (with a bundletool wrapper on PATH, also used by codemagic in place of its bundled jar) and git. Runs as the non-root user “codemagic” (uid 1000) in /workspace.

Note: bundletool ships an x86_64-only aapt2, so APK generation from bundles (build-apks, build-universal-apk) only works on linux/amd64.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
platformScalar -

Target platform (e.g. “linux/amd64”). Defaults to the engine’s native platform.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Codemagicclitools().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.codemagic_cli_tools()
		.container()
	)
@func()
example(): Container {
	return dag
		.codemagicCliTools()
		.container()
}

createKeystore() 🔗

CreateKeystore creates a new Android keystore with a single key (android-keystore create) and returns it.

At least one issuer attribute (commonName, organization, …, or distinguishedName) is required. Passwords must be at least 6 characters long.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
keystorePasswordSecret !-

Keystore password.

keyAliasString !-

Alias of the key to create.

keyPasswordSecret -

Key password. Defaults to the keystore password.

commonNameString -

Issuer common name (first and last name or company name).

organizationString -

Issuer organization.

organizationUnitString -

Issuer organizational unit.

localityString -

Issuer locality (city, county, …).

stateString -

Issuer state or province.

countryString -

Issuer two-letter country code.

distinguishedNameString -

Full issuer distinguished name, e.g. “CN=corp.example.com,L=Mountain View,C=US”. Takes precedence over the individual attributes.

validityInteger 10000

Validity of the key in days.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 create-keystore --keystore-password env:MYSECRET --key-alias string
func (m *MyModule) Example(keystorePassword *dagger.Secret, keyAlias string) *dagger.File  {
	return dag.
			Codemagicclitools().
			Createkeystore(keystorePassword, keyAlias)
}
@function
def example(keystorepassword: dagger.Secret, keyalias: str) -> dagger.File:
	return (
		dag.codemagic_cli_tools()
		.createkeystore(keystorepassword, keyalias)
	)
@func()
example(keystorePassword: Secret, keyAlias: string): File {
	return dag
		.codemagicCliTools()
		.createKeystore(keystorePassword, keyAlias)
}

exec() 🔗

Exec runs an arbitrary command (e.g. [“google-play”, “tracks”, “list”, “–package-name”, “com.example”]) in the codemagic container and returns the resulting container. This is the escape hatch for tools and options that have no typed wrapper.

The optional source directory is copied to /workspace (the working directory). Pass secrets via secretEnv names + secrets (same length, paired by index) and reference them as “@env:” in args.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-

Command and arguments to run.

sourceDirectory -

Directory copied to /workspace before running the command.

secretEnv[String ! ] -

Names of environment variables to set from secrets (paired with secrets by index).

secrets[Secret ! ] -

Secret values for secretEnv.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 exec --args string1 --args string2
func (m *MyModule) Example(args []string) *dagger.Container  {
	return dag.
			Codemagicclitools().
			Exec(args)
}
@function
def example(args: List[str]) -> dagger.Container:
	return (
		dag.codemagic_cli_tools()
		.exec(args)
	)
@func()
example(args: string[]): Container {
	return dag
		.codemagicCliTools()
		.exec(args)
}

gitChangelog() 🔗

GitChangelog generates a changelog from the git history of source (git-changelog generate).

source must contain the .git directory (e.g. pass the repository root; in CI make sure the checkout is not too shallow for the requested range).

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-

Git repository (including .git).

previousCommitString -

Stop at this commit hash (exclusive), e.g. the commit of the previous release.

skipPatternString -

Regex for commit message lines to skip. Defaults to codemagic’s merge-commit pattern.

commitLimitInteger 50

Maximum number of commits to read from git before filtering.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 git-changelog --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Codemagicclitools().
			Gitchangelog(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.codemagic_cli_tools()
		.gitchangelog(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.codemagicCliTools()
		.gitChangelog(source)
}

googlePlay() 🔗

GooglePlay returns a google-play wrapper authenticated with the given service account credentials.

Return Type
CodemagicCliToolsGooglePlay !
Arguments
NameTypeDefault ValueDescription
credentialsSecret !-

Google Play service account credentials (JSON key file contents).

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET
func (m *MyModule) Example(credentials *dagger.Secret) *dagger.CodemagicCliToolsGooglePlay  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials)
}
@function
def example(credentials: dagger.Secret) -> dagger.CodemagicCliToolsGooglePlay:
	return (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
	)
@func()
example(credentials: Secret): CodemagicCliToolsGooglePlay {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
}

latestBundletoolVersion() 🔗

LatestBundletoolVersion returns the latest bundletool release version from GitHub.

Resolves the github.com/google/bundletool/releases/latest redirect instead of the REST API to avoid unauthenticated API rate limits.

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 latest-bundletool-version
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Latestbundletoolversion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.latestbundletoolversion()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.latestBundletoolVersion()
}

latestCodemagicVersion() 🔗

LatestCodemagicVersion returns the latest codemagic-cli-tools version published on PyPI.

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 latest-codemagic-version
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Codemagicclitools().
			Latestcodemagicversion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.codemagic_cli_tools()
		.latestcodemagicversion()
	)
@func()
async example(): Promise<string> {
	return dag
		.codemagicCliTools()
		.latestCodemagicVersion()
}

publish() 🔗

Publish builds the multi-arch codemagic-cli-tools image and pushes it to a container registry as /codemagic-cli-tools:.

Returns the published image reference (with digest).

Return Type
String !
Arguments
NameTypeDefault ValueDescription
registryString !-

Registry/namespace to push to, e.g. “ghcr.io/daniel-naegele”.

usernameString !-

Registry username.

passwordSecret !-

Registry password or token.

platformsString "linux/amd64,linux/arm64"

Comma-separated list of platforms to build.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 publish --registry string --username string --password env:MYSECRET
func (m *MyModule) Example(ctx context.Context, registry string, username string, password *dagger.Secret) string  {
	return dag.
			Codemagicclitools().
			Publish(ctx, registry, username, password)
}
@function
async def example(registry: str, username: str, password: dagger.Secret) -> str:
	return await (
		dag.codemagic_cli_tools()
		.publish(registry, username, password)
	)
@func()
async example(registry: string, username: string, password: Secret): Promise<string> {
	return dag
		.codemagicCliTools()
		.publish(registry, username, password)
}

universalApk() 🔗

UniversalApk generates a universal APK from an App Bundle using the universal-apk generate tool.

Deprecated upstream in favour of android-app-bundle build-universal-apk; prefer AndroidAppBundle.BuildUniversalApk. Kept for parity with the CLI. Requires linux/amd64.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
bundleFile !-

Android App Bundle (.aab).

keystoreFile -

Keystore used to sign the generated APK.

keystorePasswordSecret -

Keystore password (required with keystore).

keyAliasString -

Alias of the signing key (required with keystore).

keyPasswordSecret -

Key password. Defaults to the keystore password.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 universal-apk --bundle file:path
func (m *MyModule) Example(bundle *dagger.File) *dagger.File  {
	return dag.
			Codemagicclitools().
			Universalapk(bundle)
}
@function
def example(bundle: dagger.File) -> dagger.File:
	return (
		dag.codemagic_cli_tools()
		.universalapk(bundle)
	)
@func()
example(bundle: File): File {
	return dag
		.codemagicCliTools()
		.universalApk(bundle)
}

withBundletoolVersion() 🔗

WithBundletoolVersion returns this module configured to use the given bundletool version.

Return Type
CodemagicCliTools !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 with-bundletool-version --version string
func (m *MyModule) Example(version string) *dagger.CodemagicCliTools  {
	return dag.
			Codemagicclitools().
			Withbundletoolversion(version)
}
@function
def example(version: str) -> dagger.CodemagicCliTools:
	return (
		dag.codemagic_cli_tools()
		.withbundletoolversion(version)
	)
@func()
example(version: string): CodemagicCliTools {
	return dag
		.codemagicCliTools()
		.withBundletoolVersion(version)
}

withCodemagicVersion() 🔗

WithCodemagicVersion returns this module configured to use the given codemagic-cli-tools version.

Return Type
CodemagicCliTools !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 with-codemagic-version --version string
func (m *MyModule) Example(version string) *dagger.CodemagicCliTools  {
	return dag.
			Codemagicclitools().
			Withcodemagicversion(version)
}
@function
def example(version: str) -> dagger.CodemagicCliTools:
	return (
		dag.codemagic_cli_tools()
		.withcodemagicversion(version)
	)
@func()
example(version: string): CodemagicCliTools {
	return dag
		.codemagicCliTools()
		.withCodemagicVersion(version)
}

withJavaVersion() 🔗

WithJavaVersion returns this module configured to use the given Java (Temurin JDK) major version.

Return Type
CodemagicCliTools !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 with-java-version --version string
func (m *MyModule) Example(version string) *dagger.CodemagicCliTools  {
	return dag.
			Codemagicclitools().
			Withjavaversion(version)
}
@function
def example(version: str) -> dagger.CodemagicCliTools:
	return (
		dag.codemagic_cli_tools()
		.withjavaversion(version)
	)
@func()
example(version: string): CodemagicCliTools {
	return dag
		.codemagicCliTools()
		.withJavaVersion(version)
}

withPythonVersion() 🔗

WithPythonVersion returns this module configured to use the given Python base image version.

Return Type
CodemagicCliTools !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 with-python-version --version string
func (m *MyModule) Example(version string) *dagger.CodemagicCliTools  {
	return dag.
			Codemagicclitools().
			Withpythonversion(version)
}
@function
def example(version: str) -> dagger.CodemagicCliTools:
	return (
		dag.codemagic_cli_tools()
		.withpythonversion(version)
	)
@func()
example(version: string): CodemagicCliTools {
	return dag
		.codemagicCliTools()
		.withPythonVersion(version)
}

CodemagicCliToolsAndroidAppBundle 🔗

AndroidAppBundle wraps the android-app-bundle tool for a single Android App Bundle (.aab).

buildApks() 🔗

BuildApks generates an APK set archive (.apks) from the bundle (android-app-bundle build-apks).

Signing is optional; without a keystore bundletool signs with a debug key. Requires linux/amd64 (bundletool’s bundled aapt2 is x86_64 only).

Return Type
File !
Arguments
NameTypeDefault ValueDescription
keystoreFile -

Keystore used to sign the generated APKs.

keystorePasswordSecret -

Keystore password (required with keystore).

keyAliasString -

Alias of the signing key (required with keystore).

keyPasswordSecret -

Key password. Defaults to the keystore password.

universalBoolean -

Build a single universal APK inside the set (–mode universal).

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path \
 build-apks
func (m *MyModule) Example(bundle *dagger.File) *dagger.File  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle).
			Buildapks()
}
@function
def example(bundle: dagger.File) -> dagger.File:
	return (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
		.buildapks()
	)
@func()
example(bundle: File): File {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
		.buildApks()
}

buildUniversalApk() 🔗

BuildUniversalApk generates a single universal APK from the bundle (android-app-bundle build-universal-apk).

Signing is optional; without a keystore bundletool signs with a debug key. Requires linux/amd64 (bundletool’s bundled aapt2 is x86_64 only).

Return Type
File !
Arguments
NameTypeDefault ValueDescription
keystoreFile -

Keystore used to sign the generated APK.

keystorePasswordSecret -

Keystore password (required with keystore).

keyAliasString -

Alias of the signing key (required with keystore).

keyPasswordSecret -

Key password. Defaults to the keystore password.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path \
 build-universal-apk
func (m *MyModule) Example(bundle *dagger.File) *dagger.File  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle).
			Builduniversalapk()
}
@function
def example(bundle: dagger.File) -> dagger.File:
	return (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
		.builduniversalapk()
	)
@func()
example(bundle: File): File {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
		.buildUniversalApk()
}

dump() 🔗

Dump prints a target of the bundle (android-app-bundle dump), e.g. the manifest.

Use xpath to extract a single attribute, e.g. “/manifest/@android:versionCode” or “/manifest/@package”.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
targetString "manifest"

What to dump: manifest, resources, config or runtime-enabled-sdk-config.

xpathString -

XML path to a specific attribute in the target (manifest only).

moduleString -

Module to dump the manifest of (defaults to “base”).

resourceString -

Resource name or ID to look up (resources only).

valuesBoolean -

Also print resource values (resources only).

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path \
 dump
func (m *MyModule) Example(ctx context.Context, bundle *dagger.File) string  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle).
			Dump(ctx)
}
@function
async def example(bundle: dagger.File) -> str:
	return await (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
		.dump()
	)
@func()
async example(bundle: File): Promise<string> {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
		.dump()
}

isSigned() 🔗

IsSigned reports whether the bundle is signed (android-app-bundle is-signed).

Return Type
Boolean !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path \
 is-signed
func (m *MyModule) Example(ctx context.Context, bundle *dagger.File) bool  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle).
			Issigned(ctx)
}
@function
async def example(bundle: dagger.File) -> bool:
	return await (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
		.issigned()
	)
@func()
async example(bundle: File): Promise<boolean> {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
		.isSigned()
}

sign() 🔗

Sign signs the bundle with the given keystore using jarsigner (android-app-bundle sign) and returns the signed bundle.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
keystoreFile !-

Keystore file (.jks / .keystore).

keystorePasswordSecret !-

Keystore password.

keyAliasString !-

Alias of the signing key.

keyPasswordSecret -

Key password. Defaults to the keystore password.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path \
 sign --keystore file:path --keystore-password env:MYSECRET --key-alias string
func (m *MyModule) Example(bundle *dagger.File, keystore *dagger.File, keystorePassword *dagger.Secret, keyAlias string) *dagger.File  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle).
			Sign(keystore, keystorePassword, keyAlias)
}
@function
def example(bundle: dagger.File, keystore: dagger.File, keystorepassword: dagger.Secret, keyalias: str) -> dagger.File:
	return (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
		.sign(keystore, keystorepassword, keyalias)
	)
@func()
example(bundle: File, keystore: File, keystorePassword: Secret, keyAlias: string): File {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
		.sign(keystore, keystorePassword, keyAlias)
}

validate() 🔗

Validate verifies the bundle is valid and returns information about it (android-app-bundle validate).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-app-bundle --bundle file:path \
 validate
func (m *MyModule) Example(ctx context.Context, bundle *dagger.File) string  {
	return dag.
			Codemagicclitools().
			Androidappbundle(bundle).
			Validate(ctx)
}
@function
async def example(bundle: dagger.File) -> str:
	return await (
		dag.codemagic_cli_tools()
		.androidappbundle(bundle)
		.validate()
	)
@func()
async example(bundle: File): Promise<string> {
	return dag
		.codemagicCliTools()
		.androidAppBundle(bundle)
		.validate()
}

CodemagicCliToolsAndroidKeystore 🔗

AndroidKeystore wraps the android-keystore tool for an existing keystore.

certificate() 🔗

Certificate returns the certificate of the key as JSON (android-keystore certificate --json).

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-keystore --keystore file:path --keystore-password env:MYSECRET --key-alias string \
 certificate
func (m *MyModule) Example(ctx context.Context, keystore *dagger.File, keystorePassword *dagger.Secret, keyAlias string) string  {
	return dag.
			Codemagicclitools().
			Androidkeystore(keystore, keystorePassword, keyAlias).
			Certificate(ctx)
}
@function
async def example(keystore: dagger.File, keystorepassword: dagger.Secret, keyalias: str) -> str:
	return await (
		dag.codemagic_cli_tools()
		.androidkeystore(keystore, keystorepassword, keyalias)
		.certificate()
	)
@func()
async example(keystore: File, keystorePassword: Secret, keyAlias: string): Promise<string> {
	return dag
		.codemagicCliTools()
		.androidKeystore(keystore, keystorePassword, keyAlias)
		.certificate()
}

verify() 🔗

Verify checks that the keystore can be unlocked with the password and contains the alias (android-keystore verify). Fails otherwise.

Return Type
String !
Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 android-keystore --keystore file:path --keystore-password env:MYSECRET --key-alias string \
 verify
func (m *MyModule) Example(ctx context.Context, keystore *dagger.File, keystorePassword *dagger.Secret, keyAlias string) string  {
	return dag.
			Codemagicclitools().
			Androidkeystore(keystore, keystorePassword, keyAlias).
			Verify(ctx)
}
@function
async def example(keystore: dagger.File, keystorepassword: dagger.Secret, keyalias: str) -> str:
	return await (
		dag.codemagic_cli_tools()
		.androidkeystore(keystore, keystorepassword, keyalias)
		.verify()
	)
@func()
async example(keystore: File, keystorePassword: Secret, keyAlias: string): Promise<string> {
	return dag
		.codemagicCliTools()
		.androidKeystore(keystore, keystorePassword, keyAlias)
		.verify()
}

CodemagicCliToolsGooglePlay 🔗

GooglePlay wraps the google-play tool (Google Play Developer API) authenticated with a service account.

getTrack() 🔗

GetTrack returns information about a release track as JSON (google-play tracks get).

Return Type
String !
Arguments
NameTypeDefault ValueDescription
packageNameString !-

Application package name, e.g. “com.example.app”.

trackString !-

Track name, e.g. “internal”.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 get-track --package-name string --track string
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, packageName string, track string) string  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Gettrack(ctx, packageName, track)
}
@function
async def example(credentials: dagger.Secret, packagename: str, track: str) -> str:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.gettrack(packagename, track)
	)
@func()
async example(credentials: Secret, packageName: string, track: string): Promise<string> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.getTrack(packageName, track)
}

latestBuildNumber() 🔗

LatestBuildNumber returns the highest version code of the app on Google Play, optionally restricted to the given tracks (google-play get-latest-build-number).

Return Type
Integer !
Arguments
NameTypeDefault ValueDescription
packageNameString !-

Application package name, e.g. “com.example.app”.

tracks[String ! ] -

Only consider these tracks (e.g. [“internal”, “production”]). Defaults to all tracks.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 latest-build-number --package-name string
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, packageName string) int  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Latestbuildnumber(ctx, packageName)
}
@function
async def example(credentials: dagger.Secret, packagename: str) -> int:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.latestbuildnumber(packagename)
	)
@func()
async example(credentials: Secret, packageName: string): Promise<number> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.latestBuildNumber(packageName)
}

listTracks() 🔗

ListTracks returns information about all release tracks as JSON (google-play tracks list).

Return Type
String !
Arguments
NameTypeDefault ValueDescription
packageNameString !-

Application package name, e.g. “com.example.app”.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 list-tracks --package-name string
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, packageName string) string  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Listtracks(ctx, packageName)
}
@function
async def example(credentials: dagger.Secret, packagename: str) -> str:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.listtracks(packagename)
	)
@func()
async example(credentials: Secret, packageName: string): Promise<string> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.listTracks(packageName)
}

promoteRelease() 🔗

PromoteRelease promotes a release from one track to another (google-play tracks promote-release). Returns the updated target track as JSON.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
packageNameString !-

Application package name, e.g. “com.example.app”.

sourceTrackString !-

Track to promote from, e.g. “internal”.

targetTrackString !-

Track to promote to, e.g. “production”.

releaseStatusString "completed"

Status of the promoted release: completed, inProgress, halted or draft.

userFractionFloat -

User fraction in range (0, 1) for staged releases (status inProgress or halted). 0 leaves it unset.

versionCodeFilterString -

Promote only the source release containing this version code.

releaseStatusFilterString -

Promote only a source release with this status.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 promote-release --package-name string --source-track string --target-track string
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, packageName string, sourceTrack string, targetTrack string) string  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Promoterelease(ctx, packageName, sourceTrack, targetTrack)
}
@function
async def example(credentials: dagger.Secret, packagename: str, sourcetrack: str, targettrack: str) -> str:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.promoterelease(packagename, sourcetrack, targettrack)
	)
@func()
async example(credentials: Secret, packageName: string, sourceTrack: string, targetTrack: string): Promise<string> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.promoteRelease(packageName, sourceTrack, targetTrack)
}

publishBundle() 🔗

PublishBundle uploads an App Bundle and releases it to a track (google-play bundles publish). The package name is read from the bundle. Returns the release information as JSON.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
bundleFile !-

Android App Bundle (.aab) to publish.

trackString !-

Release track, e.g. “internal”, “alpha”, “beta” or “production”.

releaseNameString -

Release name. Defaults to the bundle’s versionName.

releaseNotesString -

Localised release notes as JSON, e.g. ‘[{“language”: “en-US”, “text”: “Bug fixes”}]’.

inAppUpdatePriorityInteger -1

In-app update priority in range [0, 5]. -1 leaves it unset.

rolloutFractionFloat -

Staged rollout user fraction in range (0, 1). 0 leaves it unset (full rollout).

draftBoolean -

Create the release as a draft (mutually exclusive with rolloutFraction).

changesNotSentForReviewBoolean -

Do not send the changes for review automatically.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 publish-bundle --bundle file:path --track string
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, bundle *dagger.File, track string) string  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Publishbundle(ctx, bundle, track)
}
@function
async def example(credentials: dagger.Secret, bundle: dagger.File, track: str) -> str:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.publishbundle(bundle, track)
	)
@func()
async example(credentials: Secret, bundle: File, track: string): Promise<string> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.publishBundle(bundle, track)
}

uploadBundle() 🔗

UploadBundle uploads an App Bundle without releasing it to a track (google-play bundles upload). Returns the uploaded bundle information as JSON.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
bundleFile !-

Android App Bundle (.aab) to upload.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 upload-bundle --bundle file:path
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, bundle *dagger.File) string  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Uploadbundle(ctx, bundle)
}
@function
async def example(credentials: dagger.Secret, bundle: dagger.File) -> str:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.uploadbundle(bundle)
	)
@func()
async example(credentials: Secret, bundle: File): Promise<string> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.uploadBundle(bundle)
}

uploadToInternalAppSharing() 🔗

UploadToInternalAppSharing uploads an App Bundle to Internal App Sharing (google-play internal-app-sharing upload-bundle). Returns the artifact (incl. download URL) as JSON.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
bundleFile !-

Android App Bundle (.aab) to upload.

Example
dagger -m github.com/daniel-naegele/daggerverse/codemagic-cli-tools@003f668d6c6d5649dddbc4e47637d61f07d76483 call \
 google-play --credentials env:MYSECRET \
 upload-to-internal-app-sharing --bundle file:path
func (m *MyModule) Example(ctx context.Context, credentials *dagger.Secret, bundle *dagger.File) string  {
	return dag.
			Codemagicclitools().
			Googleplay(credentials).
			Uploadtointernalappsharing(ctx, bundle)
}
@function
async def example(credentials: dagger.Secret, bundle: dagger.File) -> str:
	return await (
		dag.codemagic_cli_tools()
		.googleplay(credentials)
		.uploadtointernalappsharing(bundle)
	)
@func()
async example(credentials: Secret, bundle: File): Promise<string> {
	return dag
		.codemagicCliTools()
		.googlePlay(credentials)
		.uploadToInternalAppSharing(bundle)
}