Skip to content

Commit

Permalink
Merge pull request #3202 from getsentry/rz/feat/session-replay-new-mo…
Browse files Browse the repository at this point in the history
…dule

Add new sentry-android-replay module
  • Loading branch information
romtsn committed Feb 13, 2024
2 parents 0816a48 + 2dbe2ce commit fdd4363
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ subprojects {
"sentry-android-ndk",
"sentry-android-okhttp",
"sentry-android-sqlite",
"sentry-android-replay",
"sentry-android-timber"
)
if (jacocoAndroidModules.contains(name)) {
Expand Down Expand Up @@ -305,7 +306,9 @@ private val androidLibs = setOf(
"sentry-android-navigation",
"sentry-android-okhttp",
"sentry-android-timber",
"sentry-compose-android"
"sentry-compose-android",
"sentry-android-sqlite",
"sentry-android-replay"
)

private val androidXLibs = listOf(
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ object Config {

val minSdkVersion = 19
val minSdkVersionOkHttp = 21
val minSdkVersionReplay = 26
val minSdkVersionNdk = 19
val minSdkVersionCompose = 21
val targetSdkVersion = sdkVersion
Expand Down
1 change: 1 addition & 0 deletions sentry-android-replay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
78 changes: 78 additions & 0 deletions sentry-android-replay/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.config.KotlinCompilerVersion

plugins {
id("com.android.library")
kotlin("android")
jacoco
id(Config.QualityPlugins.jacocoAndroid)
id(Config.QualityPlugins.gradleVersions)
id(Config.QualityPlugins.detektPlugin)
}

android {
compileSdk = Config.Android.compileSdkVersion
namespace = "io.sentry.android.replay"

defaultConfig {
targetSdk = Config.Android.targetSdkVersion
minSdk = Config.Android.minSdkVersionReplay

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}

buildTypes {
getByName("debug")
getByName("release")
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
kotlinOptions.languageVersion = Config.kotlinCompatibleLanguageVersion
}

testOptions {
animationsDisabled = true
unitTests.apply {
isReturnDefaultValues = true
isIncludeAndroidResources = true
}
}

lint {
warningsAsErrors = true
checkDependencies = true

// We run a full lint analysis as build part in CI, so skip vital checks for assemble tasks.
checkReleaseBuilds = false
}

variantFilter {
if (Config.Android.shouldSkipDebugVariant(buildType.name)) {
ignore = true
}
}
}

kotlin {
explicitApi()
}

dependencies {
api(projects.sentry)

implementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))

// tests
testImplementation(projects.sentryTestSupport)
testImplementation(Config.TestLibs.kotlinTestJunit)
testImplementation(Config.TestLibs.androidxJunit)
testImplementation(Config.TestLibs.mockitoKotlin)
testImplementation(Config.TestLibs.mockitoInline)
}

tasks.withType<Detekt> {
// Target version of the generated JVM bytecode. It is used for type resolution.
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
3 changes: 3 additions & 0 deletions sentry-android-replay/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable
4 changes: 4 additions & 0 deletions sentry-android-replay/src/main/res/public.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public />
</resources>
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include(
"sentry-android-fragment",
"sentry-android-navigation",
"sentry-android-sqlite",
"sentry-android-replay",
"sentry-compose",
"sentry-compose-helper",
"sentry-apollo",
Expand Down

0 comments on commit fdd4363

Please sign in to comment.