diff --git a/src/assets/distribute/sign/build-gradle-kts-filetree.png b/src/assets/distribute/sign/build-gradle-kts-filetree.png new file mode 100644 index 000000000..f1bccb174 Binary files /dev/null and b/src/assets/distribute/sign/build-gradle-kts-filetree.png differ diff --git a/src/content/docs/distribute/Sign/android.mdx b/src/content/docs/distribute/Sign/android.mdx index 3fe98f61d..0ab0a6699 100644 --- a/src/content/docs/distribute/Sign/android.mdx +++ b/src/content/docs/distribute/Sign/android.mdx @@ -6,8 +6,9 @@ sidebar: i18nReady: true --- -import { Tabs, TabItem } from '@astrojs/starlight/components'; -import { Code } from '@astrojs/starlight/components'; +import { Image } from 'astro:assets'; +import { Code, Tabs, TabItem } from '@astrojs/starlight/components'; +import BuildGradleFiletree from '@assets/distribute/sign/build-gradle-kts-filetree.png'; To publish on the Play Store, you need to sign your app with a digital certificate. @@ -111,6 +112,22 @@ In this example the keystore was exported to base64 with `base64 -i /path/to/key Configure gradle to use your upload key when building your app in release mode by editing the `[project]/src-tauri/gen/android/app/build.gradle.kts` file. +:::tip + +There are multiple different `build.gradle.kts` files in a typical Android project. If there is no `buildTypes` block you're looking at the wrong file. The one you need is in the `app/` directory relative to the keystore file from the prior step. + +
+ + Click here for a screenshot showing its location in a typical file tree. + + build.gradle.kts location in file tree +
+ +::: + 1. Add the needed import at the beginning of the file: ```kotlin