Building the Project¶
This guide covers how to build the Cryptographer application for different environments.
Build Types¶
The project supports two build types:
- Debug: Development build with debugging enabled
- Release: Production build with optimizations
Building from Command Line¶
Debug Build¶
The APK will be generated at:
Release Build¶
The APK will be generated at:
Signing Required
Release builds require a signing configuration. See Configuration for details.
Building from Android Studio¶
- Select Build → Make Project (or press
Ctrl + F9) - For APK: Build → Build Bundle(s) / APK(s) → Build APK(s)
- Wait for the build to complete
Build Variants¶
The project currently has a single build variant. To check available variants:
Running Tests¶
Unit Tests¶
Test reports are available at:
Android Instrumented Tests¶
Requires a connected device or running emulator.
Code Quality Checks¶
Format Code¶
Check Formatting¶
Static Analysis¶
Detekt reports are available at:
Run All Checks¶
This runs: - Spotless formatting check - Detekt static analysis - Unit tests
Build Configuration¶
Key build configuration files:
- Project-level:
build.gradle.kts - App-level:
app/build.gradle.kts - Dependencies:
gradle/libs.versions.toml - Properties:
gradle.properties
Build Optimization¶
Enable Build Cache¶
The project uses Gradle build cache by default. To verify:
Parallel Execution¶
Gradle runs tasks in parallel by default. To control:
Daemon Configuration¶
Gradle daemon improves build performance:
Troubleshooting¶
Build Fails with Out of Memory¶
Increase heap size in gradle.properties:
Slow Build Times¶
- Enable build cache
- Use Gradle daemon
- Increase worker count
- Use
--no-daemononly when necessary
Dependency Resolution Issues¶
Next Steps¶
- Learn about Configuration
- Explore Development Setup
- Check CI/CD for automated builds