-
-
Couldn't load subscription status.
- Fork 1.6k
feat(kmp): update getting started and add manual setup page #11497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7a1f9a8
fix(dart): beforeSend code snippet
buenaflor 6ec4912
Merge branch 'master' into buenaflor-patch-1
buenaflor 1a572f2
Merge branch 'master' into buenaflor-patch-1
buenaflor 3f35874
update
buenaflor d7a3887
update
buenaflor 2ed64e9
update
buenaflor ea02e05
Update
buenaflor 3a6a6e8
Update index.mdx
buenaflor 752a05e
Update index.mdx
buenaflor 4ad6fd7
update docs
buenaflor 96c5645
update sidebars
buenaflor 06c0c36
Merge branch 'master' into buenaflor-patch-1
buenaflor 1782293
fix typo
buenaflor d753415
Apply suggestions from code review
buenaflor 50d4a11
update java link
buenaflor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
docs/platforms/kotlin-multiplatform/configuration/gradle.mdx
This file contains hidden or 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,80 @@ | ||
| --- | ||
| title: Gradle Plugin | ||
| sidebar_order: 5 | ||
| description: "Learn how to set up Sentry's Kotlin Multiplatform Gradle Plugin." | ||
| --- | ||
|
|
||
| The [Sentry Kotlin Multiplatform Gradle Plugin](https://github.com/getsentry/sentry-kotlin-multiplatform/tree/main/sentry-kotlin-multiplatform-gradle-plugin) is a plugin that simplifies the set up process. It can be used to configure the Sentry SDK for Kotlin Multiplatform projects. | ||
|
|
||
| The Gradle Plugin supports the following features: | ||
| - Auto-installation of the Sentry Kotlin Multiplatform SDK. | ||
| - Auto-installation of the Sentry Cocoa SDK via Cocoapods (if the Kotlin Cocoapods plugin is applied). | ||
| - Automatic configuration of the Kotlin/Native linker for seamless usage with the Swift Package Manager. | ||
|
|
||
| ## Setup | ||
|
|
||
| ### Install | ||
|
|
||
| Using Gradle in your `shared/build.gradle.kts` add: | ||
|
|
||
| ```kotlin {filename:shared/build.gradle.kts} | ||
| plugins { | ||
| id("io.sentry.kotlin.multiplatform.gradle") version "{{@inject packages.version('sentry.kotlin.kmp', '0.9.0') }}" | ||
| } | ||
| ``` | ||
|
|
||
| ### Configure | ||
|
|
||
| We expose the following configuration values: | ||
|
|
||
| ```kotlin {filename:shared/build.gradle.kts} | ||
| sentryKmp { | ||
| // Configure auto-installation of Sentry components. | ||
| autoInstall { | ||
| // Enable auto-installation of Sentry components: | ||
| // - Sentry Kotlin Multiplatform SDK | ||
| // - Sentry Cocoa SDK with Cocoapods if Kotlin Cocoapods plugin is applied. | ||
| // Default is enabled. | ||
| enabled = true | ||
|
|
||
| // Configure the commonMain source set. | ||
| commonMain { | ||
| // Enable auto-installation of the Sentry Kotlin Multiplatform SDK in commonMain. | ||
| // Default is enabled. | ||
| enabled = true | ||
|
|
||
| // Specify the version of the Sentry Kotlin Multiplatform SDK to use. | ||
| // Default is the corresponding Kotlin Multiplatform SDK version. | ||
| sentryKmpVersion = "{{@inject packages.version('sentry.kotlin.kmp', '0.9.0') }}" | ||
| } | ||
|
|
||
| // Configure the Cocoapods plugin. | ||
| cocoapods { | ||
| // Enable auto-installation of the Sentry Cocoa SDK with Cocoapods. | ||
| // Default is enabled. | ||
| enabled = true | ||
|
|
||
| // Specify the version of the Sentry Cocoa SDK to install. | ||
| // Default is the Cocoa SDK version used in the Kotlin Multiplatform SDK. | ||
| sentryCocoaVersion = "8.38.0" | ||
| } | ||
|
|
||
| // Configure the linker. This is only relevant if you are using SPM. | ||
| linker { | ||
| // Enable auto-configuration of the Kotlin/Native linker for Sentry Cocoa framework. | ||
| // Default is enabled. | ||
| enabled = true | ||
|
|
||
| // Path to the Xcode project that will be used to link the framework. | ||
| // This is used to find the derived data path in which the framework is stored for SPM. | ||
| // Default is the current project directory. | ||
| xcodeProjectPath = "path/to/your/project.xcodeproj" | ||
|
|
||
| // Path to the framework that will be linked. | ||
| // Takes precedence over xcodeprojPath if both are set. | ||
| // Default is null. | ||
| frameworkPath = "path/to/your/framework.framework" | ||
| } | ||
| } | ||
| } | ||
| ``` |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| title: Configuration | ||
| description: "Additional configuration options for the SDK." | ||
| sidebar_order: 5 | ||
| sidebar_order: 20 | ||
| --- | ||
|
|
||
| <PageGrid /> |
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...ms/kotlin-multiplatform/debug-symbols.mdx → ...lin-multiplatform/debug-symbols/index.mdx
This file contains hidden or 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 hidden or 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,31 @@ | ||
| --- | ||
| title: Features | ||
| sidebar_order: 1 | ||
| description: "Learn about the features of Sentry's Kotlin Multiplatform SDK." | ||
| --- | ||
|
|
||
| Sentry's Kotlin Multiplatform SDK enables automatic reporting of errors and exceptions. | ||
| Because the SDK provides a unified API for all supported platforms directly leveraging the native SDKs for each platform, it also supports the same features as the native SDKs. Click on a link below to see relevant features for your platform: | ||
|
|
||
| - [Apple features](/platforms/apple/features) | ||
| - [Android features](/platforms/android/features) | ||
| - [Java features](/platforms/java) | ||
|
|
||
| <Note> | ||
| Some functionality may not be available in the shared Kotlin Multiplatform layer yet. You may have to use the native SDKs directly, or write your own platform-specific code. | ||
|
|
||
| To access the native SDK init options, use the [Native Platform Options initialization](/platforms/kotlin-multiplatform/initialization-strategies/#native-platform-options). | ||
| </Note> | ||
|
|
||
| ## Supported Platforms | ||
|
|
||
| The table below lists supported platforms and their corresponding presets. | ||
|
|
||
| | Target Platform | Target Preset | | ||
| | --------------- | ------------------------------------------------------------------------------------------------------------ | | ||
| | Android | <ul><li>`androidTarget`</li></ul> | | ||
| | Kotlin/JVM | <ul><li>`jvm`</li></ul> | | ||
| | iOS | <ul><li>`iosArm64`</li><li>`iosX64`</li><li>`iosSimulatorArm64`</li></ul> | | ||
| | macOS | <ul><li>`macosArm64`</li><li>`macosX64`</li></ul> | | ||
| | watchOS | <ul><li>`watchosArm32`</li><li>`watchosArm64`</li><li>`watchosX64`</li><li>`watchosSimulatorArm64`</li></ul> | | ||
| | tvOS | <ul><li>`tvosArm64`</li><li>`tvosX64`</li><li>`tvosSimulatorArm64`</li></ul> | |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing options that are currently not in KMP layer