Skip to content

Conversation

@LukasMod
Copy link
Contributor

Keystore credentials weren't available since the gradle.properties setup is skipped in the re-sign flow. This caused builds using the re-sign flag to fall back to the default debug keystore.

@thymikee
Copy link
Contributor

Why not enable gradle properties setup in re-sign flow though?

@LukasMod
Copy link
Contributor Author

Re-sign is done by apksigner and passed arguments

async function signArchive({
  binaryPath,
  keystorePath,
  keystorePassword,
  keyAlias,
  keyPassword,
}: SignOptions) {
...
  const apksignerArgs = [
    'sign',
    '--ks',
    keystorePath,
    '--ks-pass',
    formatPassword(keystorePassword),
    ...(keyAlias ? ['--ks-key-alias', keyAlias] : []),
    ...(keyPassword ? ['--key-pass', formatPassword(keyPassword)] : []),
    ...(isAab(binaryPath) ? ['--min-sdk-version', '36'] : []),
    binaryPath,
  ];

  try {
    await spawn(apksignerPath, apksignerArgs);

which gets data from signArchive options or fallback to default

  const keystorePath = options.keystorePath ?? 'android/app/debug.keystore';
  await signArchive({
    binaryPath: outputPath,
    keystorePath,
    keystorePassword: options.keystorePassword ?? 'pass:android',
    keyAlias: options.keyAlias,
    keyPassword: options.keyPassword,
  });

Not sure if this will read from properties without additional changes, looks like it doesn't touch gradle.

@thymikee thymikee merged commit 0bbc1b7 into callstackincubator:main Dec 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants