Updating the SDK for Android
Ensure that the Instabug version is consistent across all dependencies, as illustrated below
Gradle Groovy DSL
Updating the Instabug Gradle Plugin
To update to the latest version 14.0.0
, modify the root build.gradle
file as follows:
buildscript {
dependencies {
classpath "com.instabug.library:instabug-plugin:14.0.0"
}
}
Updating the Instabug Dependency
In the Application’s build.gradle
file, include the following dependencies:
..
dependencies {
// App dependencies
implementation("com.instabug.library:instabug:14.0.0")
implementation("com.instabug.library:instabug-ndk-crash:14.0.0") // optional
implementation("com.instabug.library:instabug-compose:14.0.0") // optional
implementation("com.instabug.library:instabug-with-okhttp-interceptor:14.0.0") // optional
implementation("com.instabug.library:instabug-apm-okhttp-interceptor:14.0.0") // optional
implementation("com.instabug.library:instabug-apm-grpc-interceptor:14.0.0") // optional
}
Gradle Kotlin DSL
Updating the Instabug Gradle Plugin
To update to the latest version 14.0.0,
adjust the root build.gradle
file as shown below:
plugins {
id("com.instabug.library") version "14.0.0" apply false // optional, only add if using any Instabug plugins
}
Updating the Instabug Dependency
In the Application’s build.gradle.kts
file, include the following dependencies:
dependencies {
// App dependencies
implementation("com.instabug.library:instabug:14.0.0")
implementation("com.instabug.library:instabug-ndk-crash:14.0.0") // optional
implementation("com.instabug.library:instabug-compose:14.0.0") // optional
implementation("com.instabug.library:instabug-with-okhttp-interceptor:14.0.0") // optional
implementation("com.instabug.library:instabug-apm-okhttp-interceptor:14.0.0") // optional
implementation("com.instabug.library:instabug-apm-grpc-interceptor:14.0.0") // optional
}
Gradle Version Catalog TOML
Ensure that the Instabug version is consistent across all dependencies, as illustrated below:
Updating the libs.versions.toml File
To update the Instabug version to 14.0.0,
make the following changes:
[versions]
instabug = "14.0.0" // Instabug Version
[libraries]
instabug-main = { module = "com.instabug.library:instabug", version.ref = "instabug"}
instabug-ndk-crash = {module = "com.instabug.library:instabug-ndk-crash", version.ref = "instabug"}
instabug-compose = {module = "com.instabug.library:instabug-compose", version.ref = "instabug"}
instabug-okhttp = {module = "com.instabug.library:instabug-with-okhttp-interceptor", version.ref = "instabug"}
instabug-apm-okhttp = {module = "com.instabug.library:instabug-apm-okhttp-interceptor", version.ref = "instabug"}
instabug-apm-grpc = {module = "com.instabug.library:instabug-apm-grpc-interceptor", version.ref = "instabug"}
[plugins]
instabug-plugin = {id = "com.instabug.library", version.ref = "instabug"}
Updating the Instabug Gradle Plugin
In the root build.gradle.kts
file, include:
plugins {
alias(libs.plugins.instabug.plugin) apply false
}
Updating the Instabug Dependency
In the App's build.gradle.kts
file, configure as follows:
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("instabug") // optional
id("instabug-apm") // optional
id("instabug-crash") // optional
id("instabug-compiler-extension") // optional
}
instabug { // Plugins configuration
setCaptureComposeNavigationDestinations(true) // Enables automatic screen identification for Compose, default is false
crashReporting { // Crash reporting configuration
autoUploadEnabled = false // Enables/disables uploading for whitelisted variants, default is false
appToken = "token" // Provides the application's token
experimentalGuardSquareSupportEnabled = false // Enables/disables GuardSquare's product checking and processing, default is false
}
apm { // APM Configurations
webViewsTrackingEnabled = true // Enables automatic WebView collection, default is false; feature won't work if disabled from the plugin
fragmentSpansEnabled = true // Enables fragment spans collection, default is false; feature won't work if disabled from the plugin
networkEnabled = true // Enables automatic network interception (OkHttp & URLConnection), default is true
}
compilerExtension { // Compiler extension configurations
version = "x.y.z" // Instabug compiler extension version that matches Kotlin version for compatibility. Refer to https://docs.instabug.com/docs/android-kotlin-compilers-compatibility
}
}
dependencies {
implementation(libs.instabug.main)
implementation(libs.instabug.ndk.crash) // optional
implementation(libs.instabug.compose) // optional
implementation(libs.instabug.apm.okhttp) // optional
implementation(libs.instabug.apm.grpc) // optional
implementation(libs.instabug.okhttp) // optional
}
Updated 2 days ago