briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Add code signing for Android release artefacts

Open freakboy3742 opened this issue 2 years ago • 1 comments

What is the problem or limitation you are having?

Briefcase currently supports code signing on macOS and Windows. Code signing is also required for Android release artefacts.

Describe the solution you'd like

briefcase package android --identity <identity> should accept a path to a keystore, and use that keystore to sign the app.

briefcase package android should prompt the user to do one of:

  1. Ad-hoc sign the app (i.e., do nothing explicit with signatures, as is done currently)
  2. Look for any file named *.jks in the project folder, the .android subfolder of the project folder, or the user's ~/.android folder, and provide those files as candidate keystores to use.
  3. Create a new keystore named org.example.myapp.jks in a .android folder of the project directory, and use that keystore.

Describe alternatives you've considered

Continue to require manual signing. The process of generating a keystore and signing the app; this is a simplification process.

Additional context

No response

freakboy3742 avatar May 11 '23 00:05 freakboy3742

You can configure both the debug and the release keystore with a build.gradle setting like this. To add it to your app, put a build_gradle_extra_content setting in the android section of your pyproject.toml file (probably as a TOML multi-line string), then rerun briefcase create android.

For a complete example, see https://github.com/beeware/briefcase/issues/2189#issuecomment-2721878049.

mhsmith avatar Aug 08 '24 12:08 mhsmith