Skip to main content

Kotzilla SDK version upgrades

note

this page is intended to help you migrate between major SDK updates that might require to go over some breaking changes

From 1.3.0 to 1.4.0

The Kotzilla SDK 1.4.0 introduces important breaking changes related to Kotlin version compatibility and HTTP client architecture. A complete changelog is available here.

Breaking Changes in 1.4.0

1. Minimum Kotlin version increased to 2.0.21

SDK version 1.4.0 and later require Kotlin 2.0.21 or higher due to binary compatibility changes.

If your project is using Kotlin 1.9.x or earlier, you need to upgrade to at least Kotlin 2.0.21 before using SDK 1.4.0.

If you need to stick with Kotlin 1.9.x, keep using the Kotzilla SDK 1.3.1.

2. Ktor HTTP Client Removed

The SDK no longer uses Ktor for HTTP communication. The kotzilla-sdk-ktor3 module has been removed (replaced with a native HTTP client implementation).

If you were using kotzilla-sdk-ktor3, you need to remove this dependency and keep only kotzilla-sdk.

Required Migration Steps

  1. Update Kotlin Version

Update your Kotlin version in your project's gradle/libs.versions.toml or build.gradle.kts:

# In gradle/libs.versions.toml
[versions]
kotlin = "2.0.21" # or higher (tested up to 2.1.20)

Or in your root build.gradle.kts:

plugins {
kotlin("multiplatform") version "2.0.21" apply false
kotlin("android") version "2.0.21" apply false
}
  1. Update SDK Version and Migrate from Ktor (if applicable)

If you were using the Ktor variant, replace kotzilla-sdk-ktor3 with kotzilla-sdk:

dependencies {
// BEFORE (1.3.x with Ktor):
// implementation("io.kotzilla:kotzilla-sdk-ktor3:1.3.x")
// implementation("io.kotzilla:kotzilla-sdk:1.3.x")

// AFTER (1.4.0 with native HTTP):
implementation("io.kotzilla:kotzilla-sdk:1.4.0")
}

If you were already using just the kotzilla-sdk, simply update the version:

dependencies {
implementation("io.kotzilla:kotzilla-sdk:1.4.0")
}

For Compose Multiplatform projects:

dependencies {
implementation("io.kotzilla:kotzilla-sdk-compose:1.4.0")
}

Tested Compatibility

The SDK 1.4.0 has been tested with:

  • Kotlin: 2.0.21 through 2.1.20
  • Android Gradle Plugin (AGP): 8.0.0 through 8.13.0
  • Gradle: 8.0 through 8.13
  • Koin: 3.5+ (no changes required)

From 0.13.x to 1.0.0

The Kotzilla SDK 1.0.0 introduces improvements to simplify the setup and enhance the reliability of the SDK. A complete changelog is available here.

If you're using version 0.13.x, you can simply update the SDK version in your build.gradle.kts files (both project and app levels) to benefit from the new improvements.

info

This version includes better support for different Ktor versions to avoid library conflicts with the version of Ktor your app is using. By default, the SDK uses Ktor2. If your app is using Ktor3, please update your build.gradle.kts file at the app level from:

implementation("io.kotzilla:kotzilla-sdk:1.0.0")

to

implementation("io.kotzilla:kotzilla-sdk-ktor3:1.0.0")

This version also simplifies the SDK setup thanks to the analytics() function. We encourage you to update your existing setup to use this one-line initialization directly in your Koin setup. You will find all the details in the dedicated guides for Android, KMP, and SDK libraries.

From 0.12.x to 0.13.x

This version 0.13.x brings important breaking changes such as renamings, and package move. Check the list of changes below

info

Going from 0.12.x to 0.13.x requires you to download a Kotzilla project, also known as kotzilla.json file.

See Kotzilla Project File page.

Maven Package Changes

See Latest Version to check for last version.

In your project Gradle file (build.gradle.kts) replace existing configuration by:

buildscript {
repositories { ... }
dependencies {
// This part to copy paste
classpath("io.kotzilla:kotzilla-plugin:0.13.6")
}
}

In your application Gradle file (build.gradle.kts) replace existing configuration by:

// --- Plugins ---
plugins {
// Add the Kotzilla Gradle plugin
id("io.kotzilla.kotzilla-plugin")
}

// --- Dependencies ---
dependencies {
// The Kotzilla SDK library dependency
implementation("io.kotzilla:kotzilla-sdk:0.13.6")
}
note
  • moved Maven package from io.kotzilla:cloud-inject to io.kotzilla:kotzilla-sdk
  • moved Maven package from io.kotzilla:cloud-inject-gradle to io.kotzilla:kotzilla-plugin

SDK Setup

You can use the SDK now with the KotzillaSDK class. In your Android app Application class, you need to activate the Kotzilla platform with KotzillaSDK.setup(this):

class MainApplication : Application() {

override fun onCreate() {
super.onCreate()

// Start Kotzilla SDK
KotzillaSDK.setup(this)

// Start Koin
startKoin {
// replace your logger with Kotzilla Analytics
analyticsLogger()

// Your Koin config here
}
}
}

Still you need to start your Koin configuration, by using analyticsLogger() to activate SDK analytics.

note
  • class CloudInjectSDK has nee renamed to KotzillaSDK
info

For more advanced SDK usage (like for Android library) look at Android Library Setup page

Gradle Plugin Configuration

The Kotzilla Gradle Plugin offers the following tasks to help manage your project:

  • task uploadMappingFile to upload your build's mapping file to the Kotzilla server to help recognised your application symbols see more
  • task generateAndroidAssetsKey to generate container key from kotzilla.json project file see more
  • task generateProjectFile to generate empty kotzilla.json with all package see more

Besides that you may need to configure manually, like for versionName:

plugins {

// Be sure to have the Kotzilla Gradle plugin
id("io.kotzilla.kotzilla-plugin") version "0.13.6" apply false
}

//...

// Advanced Kotzilla SDK coniguration
kotzilla {
versionName = "1.0"
}

ProGuard Rules

You can update your ProGuard rules file with the following rules:

-keep class io.kotzilla.json.** { *; }
-keep class io.kotzilla.data.json.** { *; }
-keep class io.kotzilla.sdk.** { *; }
note

The rule -keep class io.kotzilla.cloudinject.** { *; } has been replaced by -keep class io.kotzilla.sdk.** { *; }

Also, if needed be sure to keep classes for ktor & kotlin:

-keepclassmembers class kotlinx.** { volatile <fields>; }
-keepclassmembers class io.ktor.** { volatile <fields>; }