This document describes the release process for EUC OsmAnd Plugin.
The release.sh script automates the entire release process, ensuring consistency and proper versioning.
./release.sh [patch|minor|major] [version_code]Parameters:
patch|minor|major(optional, default:patch) - Version bump typepatch- Increment patch version (1.1.6 → 1.1.7)minor- Increment minor version and reset patch (1.1.6 → 1.2.0)major- Increment major version and reset minor/patch (1.1.6 → 2.0.0)
version_code(optional) - Explicit version code to use- If not provided, auto-increments from current code
- Useful when Play Store has consumed version codes
- Checks Git Status - Ensures working directory is clean
- Reads Current Version - From
version.properties - Calculates New Version - Based on bump type
- Confirms with User - Asks for confirmation before proceeding
- Updates version.properties - Writes new version numbers
- Commits Changes - Commits version bump with standard message
- Creates Git Tag - Tags commit as
v{version}(e.g.,v1.1.7) - Builds Signed AAB - Runs
./gradlew clean bundleRelease - Verifies Output - Checks AAB file was created
- Shows Next Steps - Displays deployment instructions
Standard patch release:
./release.sh
# or
./release.sh patchMinor version release:
./release.sh minorPatch release with specific version code:
./release.sh patch 10If the build fails, the script automatically:
- Deletes the created git tag
- Reverts the version commit
- Exits with error code
If you need to release manually:
-
Ensure git is clean:
git status
-
Update version.properties:
VERSION_MAJOR=1 VERSION_MINOR=1 VERSION_PATCH=7 VERSION_CODE=10
-
Commit version bump:
git add version.properties git commit -m "chore: Bump version to 1.1.7 (code 10)" -
Create git tag:
git tag -a v1.1.7 -m "Release version 1.1.7" -
Build signed release:
./gradlew clean bundleRelease
-
Verify AAB:
ls -lh app/build/outputs/bundle/release/app-release.aab
Format: MAJOR.MINOR.PATCH
- Displayed to users in app info
- Example:
1.1.7
- Integer that must increase with each release
- Used by Play Store to determine newest version
- Must be unique and higher than all previous uploads
- Example:
10
The release script ensures:
- Version name and code are always in sync
- Git tags match version names (
v1.1.7) - Commits are properly tagged before building
- AAB contains the correct version
After running the release script:
-
Test the AAB locally (optional but recommended)
bundletool build-apks --bundle=app/build/outputs/bundle/release/app-release.aab \ --output=test.apks \ --mode=universal \ --ks=app/release-key.jks \ --ks-key-alias=osmand-euc-world-release-key
-
Push to remote repository:
git push git push --tags
-
Upload to Google Play Console:
- Go to Play Console
- Navigate to your app → Release → Internal testing (or Production)
- Create new release
- Upload
app/build/outputs/bundle/release/app-release.aab - Complete release notes
- Review and roll out
If you receive a "shadowed by higher version code" error:
- Check highest version code in Play Console
- Run release script with explicit version code:
./release.sh patch <higher_version_code>
Example: If Play Store has code 9, use:
./release.sh patch 10- Always use the release script - Ensures consistency
- Don't skip version codes - Keep sequential when possible
- Test before deploying - Verify AAB on device if possible
- Write release notes - Document changes for users
- Keep tags in sync - Don't delete or modify release tags
- Backup keystore - Store
app/release-key.jkssecurely
Commit or stash your changes first:
git status
git add .
git commit -m "Your changes"The script automatically rolls back. Check:
- Gradle daemon:
./gradlew --stop - Dependencies:
./gradlew dependencies - Clean build:
./gradlew clean
Check build output directory:
ls -la app/build/outputs/bundle/release/Before running ./release.sh:
- All changes committed
- Tests passing (if applicable)
- Privacy policy updated (if needed)
- Play Store listing updated (if needed)
- Keystore accessible (
app/release-key.jks) - Keystore credentials available
After release:
- AAB created successfully
- Git tag created
- Pushed to remote repository
- Uploaded to Play Console
- Release notes written
- Internal testing completed
- Production rollout initiated