Frameworks
Android (Native)
Setup guide for distributing native Android Java or Kotlin builds via BuildShare.
🤖 Native Android (Gradle)
For native Android applications built using Kotlin or Java, the Gradle build system packages compiled applications into either APKs or AAB (Android App Bundle) formats.
📁 Typical Build Paths
Depending on your Gradle build type and flavor options, output paths are:
- Android APK (Debug):
./app/build/outputs/apk/debug/app-debug.apk - Android APK (Release):
./app/build/outputs/apk/release/app-release.apk - Android AAB (Release):
./app/build/outputs/bundle/release/app-release.aab
⚙️ Setup & Link
Initialize BuildShare in your project root pointing to your native Gradle build directories:
buildshare init \
--project-name "Native Android App" \
--package-name "com.example.nativeandroid" \
--android-path "./app/build/outputs/apk/release/app-release.apk"🤖 Fast Automation
Compile your release build and upload it directly in a single pipeline:
# Assemble Release APK and upload
./gradlew assembleRelease && buildshare upload android --no-confirm
# Assemble Release AAB (App Bundle) and upload
./gradlew bundleRelease && buildshare upload android --file ./app/build/outputs/bundle/release/app-release.aab --no-confirm💡 Gradle Integration Example
You can add a custom Gradle task to your app/build.gradle to invoke BuildShare CLI automatically whenever a release build completes:
tasks.register('distributeToBuildShare', Exec) {
dependsOn 'assembleRelease'
workingDir "../"
commandLine 'npx', 'buildshare', 'upload', 'android', '--no-confirm'
}Now, simply run:
./gradlew distributeToBuildShare