This guide provides step-by-step instructions on how to integrate the Epsilon SDK into your project.
Use this page as the main setup path, then open the individual module pages for library-specific details.
Add Maven Central to your build configuration.
Declare the Epsilon modules you need in your shared source set.
Export Epsilon modules only when they are part of your public iOS-facing API.
Instantiate classes such as Networking when your integration requires them.
Epsilon SDK is hosted on Maven Central. Ensure it is included in your root build.gradle.kts or settings.gradle.kts file:
repositories {
mavenCentral()
}Add the required Epsilon SDK modules to your module's build.gradle.kts. Typically, these should be added to the commonMain source set in a Kotlin Multiplatform project.
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("ag.sportradar.mobile.epsilon:epsilon-core:<version>")
implementation("ag.sportradar.mobile.epsilon:epsilon-networking:<version>")
// Add other modules as needed
}
}
}
}Using api instead of implementation makes the SDK's members available to the host application consuming your library.
If your project targets iOS, you must explicitly export the Epsilon SDK modules in your framework configuration if you want to make them visible to Swift/Objective-C code. If Epsilon SDK is not part of your public API, this step is not necessary.
In your KMP module's build.gradle.kts:
kotlin {
val iosCfg: KotlinNativeTarget.() -> Unit = {
binaries {
framework {
baseName = "YourSharedLibrary"
export("ag.sportradar.mobile.epsilon:epsilon-core:<version>")
export("ag.sportradar.mobile.epsilon:epsilon-string:<version>")
// Export other modules if they contain public APIs for iOS
}
}
}
iosArm64(iosCfg)
iosX64(iosCfg)
iosSimulatorArm64(iosCfg)
}In this case the dependencies in build.gradle.kts must be specified as api instead of implementation.
Most Epsilon SDK modules are designed to be stateless or require explicit instantiation.
To use the networking features, create an instance of the Networking class:
val networking = Networking(
prioritizedErrorResolvers = listOf(MyNetworkErrorResolver()),
userAgent = "YourApp/1.0.0",
)For more details on specific modules, refer to the Module Reference.