diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 14c70e51..da2c3684 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -25,7 +25,6 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - - name: Make format run: make format diff --git a/README.md b/README.md index dbea34fb..dfc854f4 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ This project is an experimental SDK for Kotlin Multiplatform. This SDK is a wrapper around different platforms such as JVM, Android, iOS, macOS, watchOS, tvOS that can be used on Kotlin Multiplatform. +| Packages | Maven Central +|-----------------------------------------| ------- +| sentry-kotlin-multiplatform | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-kotlin-multiplatform/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-kotlin-multiplatform) + ## Supported Platforms | Target Platform | Target preset | @@ -24,36 +28,29 @@ This SDK is a wrapper around different platforms such as JVM, Android, iOS, macO ## Configure Repository -The Kotlin Multiplatform SDK is available only on `mavenLocal`. You can declare this repository in your build script as follows: +The Kotlin Multiplatform SDK is available on `mavenCentral`. You can declare this repository in your build script as follows: ```gradle repositories { - // Currently only supported locally - mavenLocal() + mavenCentral() } ``` -and then run: - -```bash -./gradlew publishToMavenLocal -``` - ## Add dependency For a multiplatform project, you need to add the sentry-kotlin-multiplatform artifact to the `commonMain` source set: ```Kotlin val commonMain by getting { dependencies { - api("io.sentry:sentry-kotlin-multiplatform:0.0.1") + api("io.sentry:sentry-kotlin-multiplatform:") } } ``` ### Cocoa -If you are targeting Apple platforms (iOS, macOS, watchOS, tvOS), then you need to use CocoaPods to include [Sentry Cocoa](https://github.com/getsentry/sentry-cocoa) into this SDK. -One way to achieve this is to include the Sentry Cocoa SDK via the Kotlin CocoaPods extension. Be aware that your Sentry Cocoa version has to match the SDK's version. Currently the supported version is `~> 7.21.0` +If you are targeting Apple platforms (iOS, macOS, watchOS, tvOS), then you can use CocoaPods to include [Sentry Cocoa](https://github.com/getsentry/sentry-cocoa) into this SDK. +One way to achieve this is to include the Sentry Cocoa SDK via the Kotlin CocoaPods extension. Be aware that your Sentry Cocoa version has to match the version used in the KMP SDK. ```gradle cocoapods { @@ -66,7 +63,7 @@ cocoapods { baseName = "shared" // Export the SDK in order to be able to access it directly in the iOS project - export("io.sentry:sentry-kotlin-multiplatform:0.0.1") + export("io.sentry:sentry-kotlin-multiplatform:") } } ``` @@ -75,11 +72,11 @@ cocoapods { There are two main strategies for initializing the SDK: - Shared initializer - - Platform specific initializers + - Platform-specific initializers Shared initializer will initialize the SDK in your shared codebase but you will use the same configuration options for all platforms. -Platform specific initializers initialize the SDK directly in the target platform. The benefit is being able to customize the configuration options specific to the platforms. +Platform-specific initializers initialize the SDK directly in the target platform. The benefit is being able to customize the configuration options specific to the platforms. It is also possible to mix those two strategies based on your needs and project setup. @@ -140,7 +137,7 @@ class AppDelegate: NSObject, UIApplicationDelegate { } ``` -## Platform Specific Initializers +## Platform-Specific Initializers ### Android ```Kotlin