Build basics
Simple Alarm Clock uses Gradle as its build system. You can build the app using Android Studio or the command line.Build using Android Studio
Select build variant
In the Build Variants panel (usually on the left side), select your desired build variant:
developDebugdevelopReleasepremiumDebugpremiumRelease
Build the app
Click Build > Make Project or use the keyboard shortcut
Ctrl+F9 (Windows/Linux) or Cmd+F9 (Mac).Build using Gradle command line
All Gradle commands should be run from the project root directory:On Windows, use
gradlew.bat instead of ./gradlew.Product flavors
The project has two product flavors with different application IDs:Develop flavor
- Application ID:
com.better.alarm - Use case: Main development and F-Droid distribution
- Available on: Google Play, F-Droid
Premium flavor
- Application ID:
com.premium.alarm - Use case: Premium version with additional features
Build types
The project defines two build types:Debug
- Application ID suffix:
.debug(e.g.,com.better.alarm.debug) - Code coverage enabled for both unit and instrumentation tests
- Debuggable
- No code obfuscation
Release
- Signed with release keystore
- ProGuard rules applied (minification currently disabled)
- Optimized for distribution
Build variants
With 2 flavors and 2 build types, you have 4 build variants:| Variant | Flavor | Build Type | Command |
|---|---|---|---|
| developDebug | develop | debug | ./gradlew assembleDevelopDebug |
| developRelease | develop | release | ./gradlew assembleDevelopRelease |
| premiumDebug | premium | debug | ./gradlew assemblePremiumDebug |
| premiumRelease | premium | release | ./gradlew assemblePremiumRelease |
Signing configuration
Release builds require a signing configuration. The project expects the following environment variables:app/upload-keystore.jks.
Common Gradle tasks
Here are some commonly used Gradle tasks:Output locations
After building, APK files can be found in:Continuous Integration
The project uses GitHub Actions for CI. The CI pipeline builds and tests the project on every push and pull request. CI build commands (from.travis.yml):
Troubleshooting
Build fails with “SDK location not found”
Create alocal.properties file with your SDK path:
Out of memory errors
Increase Gradle heap size ingradle.properties:
Dependency resolution failures
Try cleaning and rebuilding:Next steps
- Learn about running tests
- Read the contributing guidelines
- Explore the codebase structure