This guide explains how to build and publish the Aidos Android app to GitHub Packages.
The GitHub Actions workflow (android-build-and-publish.yml) automatically:
- Builds the Android APK in release mode
- Signs the APK (optional, requires keystore secret)
- Publishes the APK to GitHub Packages Maven repository
- Uploads the APK as a workflow artifact
# Clone the repository
git clone https://github.com/jsilvanus/aidos.git
cd aidos/agent
# Ensure you have Java 21 installed
java -version
# Build the APK
gradle :androidapp:assembleReleaseThe APK will be located at:
agent/androidapp/build/outputs/apk/release/androidapp-release.apk
The workflow will build an unsigned APK without any additional configuration.
Triggers:
- Push to
mainordevelopbranches - Pull requests to
mainordevelopbranches - Manual trigger via workflow_dispatch
To sign APKs with your release key, configure these GitHub Secrets:
-
KEYSTORE_BASE64 (Required)
- Your keystore file encoded as base64
- Generate with:
base64 -i your-keystore.jks | tr -d '\n' | pbcopy # Or on Linux: base64 your-keystore.jks | tr -d '\n' | xclip -selection clipboard
- Add to GitHub > Settings > Secrets and variables > Actions > New repository secret
-
KEYSTORE_PASSWORD (Required)
- Password for the keystore file
-
KEY_ALIAS (Required)
- Alias of the signing key within the keystore
- Default:
aidos-key
-
KEY_PASSWORD (Required)
- Password for the specific key (often same as KEYSTORE_PASSWORD)
- Go to your repository on GitHub
- Settings → Secrets and variables → Actions
- Click "New repository secret"
- Add each secret with the exact names above
- Save
Some Aidos libraries are consumed from the GitHub Packages Maven registry, not Maven Central:
fi.italeino.mcp:binder-coreandbinder-android(repojsilvanus/kotlin-mcp-android-binder)io.github.jsilvanus:gitsema-core-jvm(repojsilvanus/gitsema-kotlin)- the Aidos SDK, published from
mainas0.1.0-build.<run>+<sha8>
The registry requires a token even for public packages. Locally, use a classic personal access token with only the read:packages scope, and put it in your user-level Gradle file, ~/.gradle/gradle.properties (on Windows, C:\Users\<you>\.gradle\gradle.properties):
gpr.user=<your GitHub username>
gpr.key=<your classic token with read:packages>Never put the token in a repository's gradle.properties or commit it. If it leaks, revoke it at https://github.com/settings/tokens.
In CI no personal token is needed: the workflows use the built-in GITHUB_TOKEN with packages: read (consumers) or packages: write (publish jobs). Pin the exact build version you want in agent/gradle.properties, for example mcpBinderVersion=0.1.0-build.11+73cc0f3f.
If you don't have a keystore yet, create one:
keytool -genkey -v -keystore aidos-keystore.jks \
-keyalg RSA -keysize 2048 -validity 10000 \
-alias aidos-key -storepass your-password -keypass your-password \
-dname "CN=Your Name, O=Your Organization, C=US"Then encode it for GitHub:
base64 aidos-keystore.jksThe workflow automatically publishes the APK to GitHub Packages Maven repository:
Repository URL:
https://maven.pkg.github.com/jsilvanus/aidos
Published Artifact Details:
- Group ID:
fi.italeino - Artifact ID:
aidos-android - Version:
0.1.0-build.<BUILD_NUMBER>+<COMMIT_SHA> - Packaging:
apk
To download the APK from GitHub Packages:
# Using Maven
# Configure your settings.xml with GitHub credentials
mvn dependency:copy \
-Dartifact=fi.italeino:aidos-android:0.1.0-build.123+abc12345:apk \
-DoutputDirectory=./downloads
# Using curl (requires GitHub token)
curl -H "Authorization: token YOUR_GITHUB_TOKEN" \
-L "https://maven.pkg.github.com/jsilvanus/aidos/fi/italeino/aidos-android/0.1.0-build.123/aidos-android-0.1.0-build.123.apk" \
-o aidos-android.apkAfter each build, the APK is also available as a GitHub Actions workflow artifact:
- Go to the workflow run
- Download the
aidos-android-release-apkartifact - Artifacts are retained for 30 days
Check build logs:
cd agent
gradle :androidapp:assembleRelease --no-daemon -iCommon issues:
- Java version mismatch (requires Java 21)
- Missing dependencies
- Android SDK issues
- Verify
GITHUB_TOKENhaspackages:writepermission - Check that secrets are correctly configured
- Verify network connectivity to
maven.pkg.github.com
- Verify keystore password is correct
- Confirm key alias matches the one in the keystore
- Check that keystore file is valid:
keytool -list -v -keystore aidos-keystore.jks
Located in agent/androidapp/build.gradle.kts:
- Namespace:
fi.italeino.aidos - Min SDK: 26 (Android 8.0)
- Target SDK: 34 (Android 14)
- Java Target: 11
Signing keys are configured via environment variables (set by GitHub Secrets):
KEYSTORE_FILE: Path to keystoreKEYSTORE_PASSWORD: Keystore passwordKEY_ALIAS: Key alias in keystoreKEY_PASSWORD: Key password
For local builds, you can also set signing properties in agent/gradle.properties:
keystore.file=/path/to/aidos-keystore.jks
keystore.******
key.alias=aidos-key
key.******- Set up GitHub Secrets for production builds
- Push a commit to trigger the workflow
- Monitor the workflow run in GitHub Actions
- Download the APK from workflow artifacts or GitHub Packages
- Test on Android devices (min API 26)