-
-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Jetpack Compose Navigation support (#2136)
- Loading branch information
Showing
37 changed files
with
1,101 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
style: | ||
ReturnCount: | ||
max: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
22 changes: 22 additions & 0 deletions
22
sentry-android-navigation/api/sentry-android-navigation.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
public final class io/sentry/android/navigation/BuildConfig { | ||
public static final field BUILD_TYPE Ljava/lang/String; | ||
public static final field DEBUG Z | ||
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; | ||
public static final field VERSION_NAME Ljava/lang/String; | ||
public fun <init> ()V | ||
} | ||
|
||
public final class io/sentry/android/navigation/SentryNavigationListener : androidx/navigation/NavController$OnDestinationChangedListener { | ||
public static final field Companion Lio/sentry/android/navigation/SentryNavigationListener$Companion; | ||
public static final field NAVIGATION_OP Ljava/lang/String; | ||
public fun <init> ()V | ||
public fun <init> (Lio/sentry/IHub;)V | ||
public fun <init> (Lio/sentry/IHub;Z)V | ||
public fun <init> (Lio/sentry/IHub;ZZ)V | ||
public synthetic fun <init> (Lio/sentry/IHub;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V | ||
public fun onDestinationChanged (Landroidx/navigation/NavController;Landroidx/navigation/NavDestination;Landroid/os/Bundle;)V | ||
} | ||
|
||
public final class io/sentry/android/navigation/SentryNavigationListener$Companion { | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import io.gitlab.arturbosch.detekt.Detekt | ||
|
||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
jacoco | ||
id(Config.QualityPlugins.gradleVersions) | ||
id(Config.QualityPlugins.detektPlugin) | ||
} | ||
|
||
android { | ||
compileSdk = Config.Android.compileSdkVersion | ||
|
||
defaultConfig { | ||
targetSdk = Config.Android.targetSdkVersion | ||
minSdk = Config.Android.minSdkVersion | ||
|
||
// for AGP 4.1 | ||
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"") | ||
} | ||
|
||
buildTypes { | ||
getByName("debug") | ||
getByName("release") { | ||
consumerProguardFiles("proguard-rules.pro") | ||
} | ||
} | ||
|
||
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 | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<Test> { | ||
configure<JacocoTaskExtension> { | ||
isIncludeNoLocationClasses = false | ||
} | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
} | ||
|
||
dependencies { | ||
api(projects.sentry) | ||
|
||
compileOnly(Config.Libs.navigationRuntime) | ||
|
||
// tests | ||
testImplementation(Config.Libs.navigationRuntime) | ||
|
||
testImplementation(Config.TestLibs.kotlinTestJunit) | ||
testImplementation(Config.TestLibs.mockitoKotlin) | ||
testImplementation(Config.TestLibs.mockitoInline) | ||
|
||
testImplementation(Config.TestLibs.robolectric) | ||
testImplementation(Config.TestLibs.androidxCore) | ||
testImplementation(Config.TestLibs.androidxRunner) | ||
testImplementation(Config.TestLibs.androidxJunit) | ||
testImplementation(Config.TestLibs.androidxCoreKtx) | ||
} | ||
|
||
tasks.withType<Detekt> { | ||
// Target version of the generated JVM bytecode. It is used for type resolution. | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##---------------Begin: proguard configuration for Compose ---------- | ||
|
||
# To ensure that stack traces is unambiguous | ||
# https://developer.android.com/studio/build/shrink-code#decode-stack-trace | ||
-keepattributes LineNumberTable,SourceFile | ||
|
||
##---------------End: proguard configuration for Compose ---------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="io.sentry.android.navigation"/> |
Oops, something went wrong.