Build & Deployment
Relevant source files
The following files were used as context for generating this wiki page:
The ShadowCheckMobile project utilizes a standard Android Gradle build system to manage dependencies, compile Kotlin/Java source code, and package the application into an Android Package (APK). The build process is designed to support modern Android development standards, including Jetpack Compose for UI and various hardware-level integrations for network scanning and augmented reality (AR).
This module covers the prerequisites for setting up a development environment, the structure of the build automation scripts, and the configuration required for deploying the application to physical devices or emulators.
Sources: README.md:1-23, gradlew.bat:1-15
Build Prerequisites
To successfully build ShadowCheckMobile, the development environment must meet specific software requirements. The project is optimized for Android Studio Hedgehog and targets recent Android SDK versions to leverage advanced security and scanning features.
| Component | Minimum Required Version |
|---|---|
| Android Studio | Hedgehog or later |
| JDK | 17 |
| Android SDK | 34 |
| Gradle | 8.2+ |
Sources: README.md:25-30
Build Automation and Gradle
The project includes a Gradle wrapper to ensure build consistency across different environments. On Windows systems, gradlew.bat serves as the entry point for executing build tasks without requiring a pre-installed Gradle distribution.
Build Lifecycle
The following diagram illustrates the high-level flow of the build process from cloning the repository to installing the debug APK.
The build process involves resolving dependencies via the Gradle wrapper and executing the assembleDebug task to produce a testable binary.
Sources: README.md:32-41, gradlew.bat:56-62
JVM Configuration
The Gradle execution script locates the java.exe binary, prioritizing the JAVA_HOME environment variable. If JAVA_HOME is not defined, it attempts to find Java in the system PATH. The script also supports passing custom options through DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS.
Sources: gradlew.bat:18-50
Project Manifest and Configuration
The AndroidManifest.xml file defines the application's identity, required hardware features, and security permissions necessary for network surveillance.
Essential Permissions
ShadowCheckMobile requires extensive permissions to perform its core functions of WiFi, Bluetooth, and cellular scanning.
| Permission Name | Purpose |
|---|---|
ACCESS_FINE_LOCATION | Required for mapping and pinpointing network locations. |
ACCESS_WIFI_STATE | Allows the app to view information about WiFi networking. |
BLUETOOTH_SCAN | Necessary for detecting nearby Bluetooth and BLE devices. |
FOREGROUND_SERVICE | Enables background scanning even when the app is not in focus. |
CAMERA | Required for AR network visualization features. |
Sources: app/src/main/AndroidManifest.xml:5-24
SDK and Hardware Requirements
The application targets Android 15 (SDK 35) while maintaining backward compatibility down to Android 8.0 (SDK 26). It explicitly requires OpenGL ES 3.0 for rendering AR and map components.
Sources: app/src/main/AndroidManifest.xml:3-4, app/src/main/AndroidManifest.xml:34
Deployment and Resource Management
ProGuard and Resource Shrinking
The build system is configured to optimize the APK size through resource shrinking. Specific resources related to Google Play Services for AR are explicitly protected from being stripped during the build process to ensure AR functionality remains intact.
Sources: app/src/main/res/raw/keep_arcore.xml:1-14
API Key Management
During deployment, developers must configure several API keys to enable external integrations like Mapbox and WiGLE. These can be managed through the application's UI, which stores them securely using EncryptedSharedPreferences.
The SettingsScreen facilitates the management of Mapbox, WiGLE, and Google Maps API keys, ensuring they are encrypted on the device.
Sources: app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/ui/screens/SettingsScreen.kt:216-248, app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/ui/screens/SettingsScreen.kt:305-318
Summary
Building and deploying ShadowCheckMobile requires a modern Android toolchain (SDK 34+, JDK 17). The project utilizes a robust Gradle-based automation system that handles complex dependencies like Mapbox and ARCore. Deployment involves not only installing the APK but also configuring secure API keys and managing extensive system permissions to enable the application's signature network intelligence capabilities.
Sources: README.md:25-30, app/src/main/AndroidManifest.xml:5-24