-
Notifications
You must be signed in to change notification settings - Fork 0
Development Guide
HlexNC edited this page Feb 9, 2026
·
1 revision
Setup instructions, coding conventions, and workflow for contributing to iTravel.
- Install Android Studio (Ladybug or newer)
- Clone the repository:
git clone --recurse-submodules https://github.com/HlexNC/iTravel.git
-
Open → select the
iTravel/root directory - Wait for Gradle sync to complete
- Install SDK 34 and Build Tools 36.0.0 if prompted
- Create or select an emulator (API 26+)
- Click Run ▶
- Install Docker Desktop and the Dev Containers extension
- Open the
iTravel/folder in VS Code - Press
F1→ Dev Containers: Reopen in Container - The container provides JDK 17, Android SDK 36, and Gradle automatically
- Build from terminal:
./gradlew assembleDebug
Note
The DevContainer is configured for headless builds and CI. For on-device debugging, use Android Studio.
Before running the app, configure the following keys:
// app/src/main/java/com/itravel/app/utils/Constants.java
public static final String UNSPLASH_ACCESS_KEY = "YOUR_KEY";
public static final String WEATHER_API_KEY = "YOUR_KEY";<!-- app/src/main/AndroidManifest.xml -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_GOOGLE_MAPS_KEY" />Warning
Never commit real API keys. For production, migrate keys to local.properties or BuildConfig fields injected at build time.
| Command | Description |
|---|---|
./gradlew assembleDebug |
Build debug APK |
./gradlew assembleRelease |
Build release APK |
./gradlew test |
Run unit tests |
./gradlew connectedAndroidTest |
Run instrumented tests |
./gradlew lint |
Run Android lint checks |
./gradlew clean |
Clean build outputs |
com.itravel.app
├── activities/ # Activity classes (screen hosts)
├── adapters/ # RecyclerView adapters
├── api/ # Retrofit interfaces and client
├── fragments/ # Fragment classes (UI screens)
├── models/ # Data classes and DTOs
└── utils/ # Constants, validators, helpers
| Type | Convention | Example |
|---|---|---|
| Activity | *Activity.java |
MainActivity.java |
| Fragment | *Fragment.java |
DiscoverFragment.java |
| Adapter | *Adapter.java |
FeedAdapter.java |
| Layout (activity) | activity_*.xml |
activity_main.xml |
| Layout (fragment) | fragment_*.xml |
fragment_discover.xml |
| Layout (item) | item_*.xml |
item_feed_post.xml |
| Navigation graph | nav_graph_*.xml |
nav_graph_main.xml |
| DTO model | *Dto.java |
WeatherDto.java |
| Domain model |
*.java (no suffix) |
Location.java |
- Java 17 language features are permitted
- Use
@NonNull/@Nullableannotations from AndroidX - ConstraintLayout for all new layouts
- Use
ViewBindingorfindViewByIdconsistently within a file - Keep fragment logic in
onViewCreated, notonCreateView
| Branch | Purpose |
|---|---|
main |
Stable, release-ready code |
dev |
Integration branch for features |
feature/* |
Individual feature branches |
fix/* |
Bug fix branches |
Use conventional commits:
feat: add weather overlay to feed cards
fix: GPS validator null check on missing location
docs: update API integration guide
refactor: extract Retrofit client singletons
test: add GPSValidator proximity tests
| Submodule | Path | Purpose |
|---|---|---|
iTravel-v0 |
legacy/iTravel-v0 |
Previous version (read-only reference) |
iTravel.wiki |
docs/ |
This documentation |
To update submodules:
git submodule update --remote --mergeGradle sync fails:
- Ensure JDK 17 is selected in Android Studio → Settings → Build → Gradle → JDK
- Run
./gradlew --stopthen re-sync
Map shows blank gray:
- Verify Google Maps API key is set in
AndroidManifest.xml - Check that Maps SDK for Android is enabled in Google Cloud Console
- Ensure the API key's restrictions match your debug SHA-1 fingerprint
Build errors in DevContainer:
- Run
./gradlew --versionto verify Gradle is accessible - Check that
ANDROID_SDK_ROOTis set to/opt/android-sdk
# List connected devices
adb devices
# Install debug APK
adb install app/build/outputs/apk/debug/app-debug.apk
# View app logs
adb logcat -s "iTravel"
# Clear app data
adb shell pm clear com.itravel.appiTravel — Von Travelern für Traveler · GitHub · Deggendorf Institute of Technology
Links