Skip to content

Commit 7300862

Browse files
authored
feat(android-nav3): [Android Nav3 1] Create navigation3 module (JAVA-274) (#6129)
Introduce a new `sentry-android-navigation3` module in connection with our Nav3 support.
1 parent df8e13a commit 7300862

6 files changed

Lines changed: 64 additions & 1 deletion

File tree

‎.github/ISSUE_TEMPLATE/bug_report_android.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ body:
1212
- sentry-android-ndk
1313
- sentry-android-timber
1414
- sentry-android-fragment
15+
- sentry-android-navigation3
1516
- sentry-android-sqlite
1617
- sentry-apollo
1718
- sentry-apollo-3

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The repository is organized into multiple modules:
9898
- **Logging**: `sentry-logback`, `sentry-log4j2`, `sentry-jul`, `sentry-android-timber`
9999
- **Web**: `sentry-servlet*`, `sentry-okhttp`, `sentry-openfeign`, `sentry-apache-http-client-5`
100100
- **GraphQL**: `sentry-graphql*`, `sentry-apollo*`
101-
- **Android UI**: `sentry-android-fragment`, `sentry-android-navigation`, `sentry-compose`
101+
- **Android UI**: `sentry-android-fragment`, `sentry-android-navigation`, `sentry-android-navigation3`, `sentry-compose`
102102
- **Session Replay**: `sentry-android-replay`
103103
- **Database**: `sentry-jdbc`, `sentry-android-sqlite`, `sentry-jcache`
104104
- **Reactive**: `sentry-reactor`, `sentry-ktor-client`

‎buildSrc/src/main/java/Config.kt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ object Config {
9898
"sentry-android-ndk",
9999
"sentry-android-fragment",
100100
"sentry-android-navigation",
101+
"sentry-android-navigation3",
101102
"sentry-android-timber",
102103
"sentry-compose-android",
103104
"sentry-android-sqlite",
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import io.gitlab.arturbosch.detekt.Detekt
2+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
3+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
4+
5+
plugins {
6+
id("com.android.library")
7+
alias(libs.plugins.kotlin.android)
8+
alias(libs.plugins.kotlin.compose)
9+
alias(libs.plugins.gradle.versions)
10+
alias(libs.plugins.detekt)
11+
}
12+
13+
android {
14+
compileSdk = libs.versions.compileSdk.get().toInt()
15+
namespace = "io.sentry.compose.navigation3"
16+
17+
defaultConfig {
18+
minSdk = libs.versions.minSdk.get().toInt()
19+
}
20+
21+
buildTypes {
22+
getByName("release") { consumerProguardFiles("proguard-rules.pro") }
23+
}
24+
25+
// AGP 9 only generates unit tests for the testBuildType. The debug variant is
26+
// disabled, so unit tests must target release to run at all.
27+
testBuildType = "release"
28+
29+
kotlin {
30+
compilerOptions.jvmTarget = JVM_1_8
31+
compilerOptions.languageVersion = KotlinVersion.KOTLIN_1_9
32+
compilerOptions.apiVersion = KotlinVersion.KOTLIN_1_9
33+
}
34+
35+
lint {
36+
warningsAsErrors = true
37+
checkDependencies = true
38+
39+
// We run a full lint analysis as build part in CI, so skip vital checks for assemble tasks.
40+
checkReleaseBuilds = false
41+
}
42+
43+
androidComponents.beforeVariants {
44+
it.enable = !Config.Android.shouldSkipDebugVariant(it.buildType)
45+
}
46+
}
47+
48+
kotlin { explicitApi() }
49+
50+
tasks.withType<Detekt>().configureEach {
51+
// Target version of the generated JVM bytecode. It is used for type resolution.
52+
jvmTarget = JavaVersion.VERSION_1_8.toString()
53+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##---------------Begin: proguard configuration for Compose ----------
2+
3+
# To ensure that stack traces is unambiguous
4+
# https://developer.android.com/studio/build/shrink-code#decode-stack-trace
5+
-keepattributes LineNumberTable,SourceFile
6+
7+
##---------------End: proguard configuration for Compose ----------

‎settings.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ include(
5151
"sentry-android-timber",
5252
"sentry-android-fragment",
5353
"sentry-android-navigation",
54+
"sentry-android-navigation3",
5455
"sentry-android-sqlite",
5556
"sentry-android-replay",
5657
"sentry-compose",

0 commit comments

Comments
 (0)