Skip to content

Lilytreasure/WeatherApp

Repository files navigation

Project Dependencies & Configuration

Android Configuration

  • AGP (Android Gradle Plugin): 8.5.2
    Plugin for building Android apps with Gradle.
  • Android Compile SDK: 34
    The Android version used for compiling the app.
  • Android Min SDK: 28
    Minimum Android version required to run the app.
  • Android Target SDK: 34
    Target Android version for the app to run on.

Android Libraries

  • androidx-activityCompose: 1.9.3
    Integration of Jetpack Compose with Android Activity lifecycle.
  • androidx-appcompat: 1.7.0
    Support for Material Design and backward compatibility for UI components.
  • androidx-constraintlayout: 2.2.0
    Flexible layout manager for building complex layouts.
  • androidx-core-ktx: 1.15.0
    Kotlin extensions for Android Core libraries.
  • androidx-espresso-core: 3.6.1
    UI testing framework for Android.
  • androidx-lifecycle: 2.8.4
    Android Lifecycle components for managing UI-related data lifecycle-aware.
  • androidx-material: 1.12.0
    Material Design components for Android.
  • androidx-test-junit: 1.2.1
    JUnit support for Android testing.

Kotlin & Compose Multiplatform

  • Compose Multiplatform: 1.7.0
    Cross-platform UI framework for building native applications.
  • Kotlin: 2.1.0
    The Kotlin programming language used for the project.

Testing & Libraries

  • JUnit: 4.13.2
    Testing framework for Java/Kotlin applications.
  • androidx-uiTest: 1.7.5
    UI testing for Jetpack Compose.

Additional Dependencies

  • BigNum: 0.3.9
    Library for working with arbitrary-precision numbers.
  • Kamel Image: 1.0.1
    Image loading library for Jetpack Compose((usage-cache weather icons)).
  • Koin Annotations: 1.3.1
    Koin annotations for dependency injection in Kotlin.
  • Lifecycle ViewModel Compose: 2.8.4
    Compose integration with ViewModel.
  • Voyager: 1.1.0-beta03
    Navigation library for Compose.
  • Napier: 2.7.1
    Logging library for Kotlin and Compose.
  • Build Config: 5.3.5
    Build-time configuration management .

Kotlinx Libraries

  • kotlinx-coroutines: 1.9.0
    Kotlin library for asynchronous programming using coroutines.
  • ktor: 3.0.1
    Kotlin framework for building server and client applications.
  • kotlinx-serialization: 1.7.3
    Kotlin serialization library for encoding/decoding data formats like JSON.
  • kotlinx-datetime: 0.6.1
    Kotlin extension library for working with date and time.

Database & Utilities

  • SQLDelight: 2.0.2
    Kotlin Multiplatform SQL library for working with databases(used to cache weather data).
  • Size Measurement: 0.5.0
    Library for measuring UI element sizes(to adapt to different screens).
  • Coil 3: 3.0.0-alpha08
    Image loading library for Jetpack Compose, with support for modern image formats(usage-cache weather icons).

##Preview

Android

iOS

Running the Project/Build

To set up the API key, follow these steps:

  1. Open Android Studio and navigate to the local.properties file.

  2. Add the following line (without quotes):

    API_KEY=<Your Plain API Key>
    
    Ensure you spell API_KEY exactly as specified to avoid errors during key generation. 
  3. Run the following command to build the project while generating the key:

  4.   ./gradlew build
    

Android

  1. Open Android Studio.
  2. Open the project as a whole and and not the android module directly to see all configurations.
  3. In Android Studio, choose the composeApp from the run configurations drop-down.
  4. Click the Build button to run the project on real device or emulator.

iOS

  1. Navigate to the iosApp folder inside the project.

  2. Open the iosApp.xcworkspace file in Xcode.

  3. In Xcode, select your Development Team under the Signing & Capabilities tab in the project settings.

  4. Select the target device or simulator.

  5. Click the Build button in Xcode to compile and run the app on the iOS simulator or device.

  6. Return to Android Studio.

  7. Select the iosApp target from the run configurations drop-down.

  8. Click the Build button in Android Studio to compile the project and deploy the app to the iOS simulator or device.

Desktop

  1.   ./gradlew :composeApp:jvmRun -DmainClass=org.craftsilicon.MainKt