Getting Started

Getting Started

You can find all Kaluga packages on Maven Central.

The current available version of Kaluga is: maven version badge

Gradle Setup

Add a Kaluga module to the shared module of your application.

dependencies {
	api("com.splendo.kaluga:base:$kaluga_version")
}

SwiftUI

To use Kaluga with SwiftUI it is recommended to use the Kaluga SwiftUI Tools. These allow for the generation of SwiftUI specific accessors to Kaluga modules. The Tools use Sourcery to generate the code, so make sure it is installed

In your build.gradle make sure the Kaluga modules to be used from SwiftUI are exported

kotlin {
	val target: KotlinNativeTarget.() -> Unit =
        {
            binaries {
                baseName = $shared_framework_name
                isStatic = false
                transitiveExport = true
                export(com.splendo.kaluga:alerts:$kaluga_version) // Optional. Set includeAlerts setting to true in the kaluga-swiftui yml
                export(com.splendo.kaluga:architecture:$kaluga_version) // Required
                export(com.splendo.kaluga:date-time-picker:$kaluga_version) // Optional. Set includeDatePicker setting to true in the kaluga-swiftui yml
                export(com.splendo.kaluga:hud:$kaluga_version) // Optional. Set includeHud setting to true in the kaluga-swiftui yml
                export(com.splendo.kaluga:keyboard:$kaluga_version) // Optional. Set includeKeyboard setting to true in the kaluga-swiftui yml
                export(com.splendo.kaluga:resources:$kaluga_version) // Optional. Set includeResources setting to true in the kaluga-swiftui yml

            }
        }
    iosX64(target)
    iosArm64(target)
    iosSimulatorArm64(target)
}

Next, set up Sourcery:

  • Checkout the Kaluga-swiftui project as a submodule to your project
  • Copy template-kaluga.sourcery.yml into the iOS folder of your shared code project and rename it to kaluga.sourcery.yml
  • Open kaluga.sourcery.yml and change:
    • $XCODE_PROJECT_NAME to the name of your xcodeproj file
    • $TARGET_NAME to the name of the target in your project
    • $PATH_TO_SUBMODULE to the path of the submodule
    • $SHARED_FRAMEWORK_NAME to the name of the Kaluga-based Shared Framework
    • Configure features

Install either manually or automatically