mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-15 05:16:28 +00:00
Add release build information (#2638)
* Add instruction for release build * Add missing links to the Google Play Store * Update release.md
This commit is contained in:
parent
d45d40eeb0
commit
74f8978d63
@ -75,6 +75,10 @@ You will need the `JAVA_HOME` environment variable set to a JDK. We are currentl
|
|||||||
gradlew.bat assembleDebug
|
gradlew.bat assembleDebug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::info
|
||||||
|
If you need to create a release build, follow the [release build instructions](/docs/android/tips/release).
|
||||||
|
:::
|
||||||
|
|
||||||
## Firebase setup
|
## Firebase setup
|
||||||
|
|
||||||
Firebase is used for notifications. If you don't need these features, you should use a mocked Firebase configuration.
|
Firebase is used for notifications. If you don't need these features, you should use a mocked Firebase configuration.
|
||||||
|
@ -23,6 +23,10 @@ This document outlines the steps to take an Android application from development
|
|||||||
- The CI builds the **release application**.
|
- The CI builds the **release application**.
|
||||||
- The release build is pushed to the **internal tester group** on both the Google Play Store and Firebase.
|
- The release build is pushed to the **internal tester group** on both the Google Play Store and Firebase.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
You can download pre-built APKs for every commit on the `main` branch from the [GitHub Actions page](https://github.com/home-assistant/android/actions/workflows/onPush.yml).
|
||||||
|
:::
|
||||||
|
|
||||||
### Internal testing
|
### Internal testing
|
||||||
|
|
||||||
- Internal testers validate the release build to ensure functionality.
|
- Internal testers validate the release build to ensure functionality.
|
||||||
@ -33,9 +37,17 @@ This document outlines the steps to take an Android application from development
|
|||||||
- Every week, the latest version of the `main` branch is pushed to the **open beta** channel.
|
- Every week, the latest version of the `main` branch is pushed to the **open beta** channel.
|
||||||
- Open beta users help test the application in real-world scenarios and report issues.
|
- Open beta users help test the application in real-world scenarios and report issues.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
You can join the beta program directly through the [Google Play Store](https://play.google.com/apps/testing/io.homeassistant.companion.android).
|
||||||
|
:::
|
||||||
|
|
||||||
### Production release
|
### Production release
|
||||||
|
|
||||||
- If the beta version is stable and approved by maintainers, it is promoted to **production**, making it available to all users.
|
If the beta version is stable and approved by maintainers, it is promoted to **production**, making it available to all users.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
You can find the app on the [Google Play Store](https://play.google.com/store/apps/details?id=io.homeassistant.companion.android).
|
||||||
|
:::
|
||||||
|
|
||||||
## Google Play Store validation
|
## Google Play Store validation
|
||||||
|
|
||||||
|
71
docs/android/tips/release.md
Normal file
71
docs/android/tips/release.md
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
title: "Build for release"
|
||||||
|
sidebar_label: "Build for release"
|
||||||
|
---
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
Ensure the keystore is securely stored and not included in version control. It also applies for the credentials.
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Building for release
|
||||||
|
|
||||||
|
To build the app for publishing, you need to sign it. Follow these steps:
|
||||||
|
|
||||||
|
### Step 1: Create or use an existing keystore
|
||||||
|
|
||||||
|
Before building the app, you must have a keystore. You can either create a new one or use an existing keystore.
|
||||||
|
|
||||||
|
#### Creating a keystore
|
||||||
|
|
||||||
|
You can create a keystore directly from Android Studio:
|
||||||
|
|
||||||
|
1. Go to **Menu** > **Build** > **Generate Signed APK**.
|
||||||
|
2. Select the option to create a new keystore.
|
||||||
|
3. **Remember the passwords and the key alias** for future use.
|
||||||
|
|
||||||
|
#### Using an existing keystore
|
||||||
|
|
||||||
|
If you already have a keystore, ensure it is named `release_keystore.keystore` and placed in the following folders:
|
||||||
|
- `app`
|
||||||
|
- `wear`
|
||||||
|
|
||||||
|
Alternatively, you can specify a custom location by setting the `KEYSTORE_PATH` environment variable.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Step 2: Build the app
|
||||||
|
|
||||||
|
You can build the app using either Android Studio or the command line (CLI).
|
||||||
|
|
||||||
|
#### From Android Studio
|
||||||
|
|
||||||
|
1. Open Android Studio.
|
||||||
|
2. Go to **Menu** > **Build** > **Generate Signed APK**.
|
||||||
|
3. Select the keystore you created or an existing one.
|
||||||
|
4. Follow the steps to build the app.
|
||||||
|
|
||||||
|
#### From the CLI
|
||||||
|
|
||||||
|
1. **Set environment variables**
|
||||||
|
Define the following environment variables used in `app/build.gradle.kts`:
|
||||||
|
- `KEYSTORE_PASSWORD`
|
||||||
|
- `KEYSTORE_ALIAS`
|
||||||
|
- `KEYSTORE_ALIAS_PASSWORD`
|
||||||
|
- `KEYSTORE_PATH` (if your keystore is located in a custom location)
|
||||||
|
|
||||||
|
2. **Build the app**
|
||||||
|
To build the APK, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew assembleRelease # To build all the apps
|
||||||
|
# OR
|
||||||
|
./gradlew :<GRADLE_MODULE>:assembleRelease # To build a specific module, such as :app, :automotive, or :wear
|
||||||
|
```
|
||||||
|
|
||||||
|
To build the AAB, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew bundleRelease # To build all the apps
|
||||||
|
# OR
|
||||||
|
./gradlew :<GRADLE_MODULE>:bundleRelease # To build a specific module, such as :app, :automotive, or :wear
|
||||||
|
```
|
@ -347,6 +347,7 @@ module.exports = {
|
|||||||
"android/tips/lollipop_emulator",
|
"android/tips/lollipop_emulator",
|
||||||
"android/tips/fcm_push_notification",
|
"android/tips/fcm_push_notification",
|
||||||
"android/tips/sarif_reports",
|
"android/tips/sarif_reports",
|
||||||
|
"android/tips/release",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"android/best_practices",
|
"android/best_practices",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user