diff --git a/android/README.md b/android/README.md index 881ace3509..0ebb7cfd20 100644 --- a/android/README.md +++ b/android/README.md @@ -47,26 +47,25 @@ Signing configuration is already set up in `build.gradle.kts`. You just need to 1. **Create a keystore:** ```bash -keytool -genkey -v -keystore keystore.jks \ +keytool -genkeypair \ -alias fleet-android \ - -keyalg RSA -keysize 2048 -validity 10000 + -keyalg RSA \ + -keysize 4096 \ + -validity 10000 \ + -keystore keystore.jks \ + -storepass YOUR_PASSWORD \ + -dname "CN=Your Name, O=Your Org, L=City, ST=State, C=US" ``` -You'll be prompted for: -- **Password** (enter twice for confirmation) - This will be used for both keystore and key -- Your name, organization, location, etc. - 2. **Create `keystore.properties` file in the `android/` directory:** ```properties -storeFile=path/to/keystore.jks -storePassword=your-password +storeFile=/path/to/keystore.jks +storePassword=YOUR_PASSWORD keyAlias=fleet-android -keyPassword=your-password +keyPassword=YOUR_PASSWORD ``` -**Note:** Use the same password you entered during keystore creation for both `storePassword` and `keyPassword`. - 3. **Build signed release:** ```bash @@ -102,8 +101,8 @@ The SHA256 fingerprint is required for MDM deployment. You can get it from your ```bash keytool -list -v -keystore keystore.jks -alias fleet-android -# Grab SHA256 -echo | xxd -r -p | base64 +# Grab SHA256 (remove colons and convert to base64) +echo | tr -d ':' | xxd -r -p | base64 ``` Copy the fingerprint for use in `FLEET_DEV_ANDROID_AGENT_SIGNING_SHA256` diff --git a/android/RELEASE.md b/android/RELEASE.md new file mode 100644 index 0000000000..c9e81d11e2 --- /dev/null +++ b/android/RELEASE.md @@ -0,0 +1,80 @@ +# Release process + +## 1. Create RC branch + +```bash +git checkout main +git pull origin main +git checkout -b rc-minor-fleetd-android-v1.X.X +``` + +## 2. Update version numbers + +In `app/build.gradle.kts`, update: + +```kotlin +defaultConfig { + versionCode = 2 // Increment by 1 each release + versionName = "1.1.0" // Semantic version for display +} +``` + +- `versionCode`: Integer that must increase with each release (Google Play requirement) +- `versionName`: Human-readable version string shown to users + +## 3. Update CHANGELOG.md + +Add an entry for the new version with changes since the last release. + +## 4. Commit and push RC branch + +```bash +git add app/build.gradle.kts CHANGELOG.md +git commit -m "Prepare release v1.1.0" +git push origin rc-minor-fleetd-android-v1.X.X +``` + +## 5. Test the RC + +- Build and test the release candidate +- Fix any issues on the RC branch (cherry-pick fixes from main if applicable) + +## 6. Build signed release + +Ensure `keystore.properties` is configured with the release signing key. + +```bash +./gradlew clean bundleRelease +``` + +Output: `app/build/outputs/bundle/release/app-release.aab` + +## 7. Upload to Google Play + +1. Go to [Google Play Console](https://play.google.com/console) +2. Select the Fleet app +3. Navigate to Release > Production (or appropriate track) +4. Upload the signed AAB +5. Add release notes +6. Review and roll out + +## 8. Tag the release + +After the release is uploaded, tag the RC branch: + +```bash +git checkout rc-minor-android-v1.X.X +git tag fleetd-android-v1.X.X +git push origin rc-minor-fleetd-android-v1.X.X +``` + +## 9. Bring version bump and CHANGELOG to main + +```bash +git checkout main +git checkout rc-minor-fleetd-android-v1.X.X -- app/build.gradle.kts CHANGELOG.md +git commit -m "Update version and CHANGELOG for fleetd-android-v1.X.X" +git push origin main +``` + +This brings only the version bump and CHANGELOG updates to main, not other RC changes. diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index b50353a90e..ece8d12ab3 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -23,8 +23,8 @@ android { applicationId = "com.fleetdm.agent" minSdk = 33 targetSdk = 36 - versionCode = 1 - versionName = "1.0" + versionCode = 2 + versionName = "1.0.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"