Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

A Kotlin Multiplatform client library for Ophan.

License

Notifications You must be signed in to change notification settings

guardian/multiplatform-ophan

Repository files navigation

Multiplatform Ophan

A Kotlin Multiplatform client library for Ophan. Available for Android, iOS, and other Multiplatform projects.

Adding as a dependency

The most recent version is 0.2.0 Snapshot version: 0.2.1-SNAPSHOT

Android

Add multiplatform-ophan as a dependency (available in Maven Central):

# Module-level build.gradle

dependencies {
     implementation 'com.gu.kotlin:multiplatform-ophan:<version>'
}

iOS

Add the Guardian's private spec repo:

pod repo add guardian git@github.com:guardian/specs.git

Add the MultiplatformOphan pod to your Podfile:

# Podfile

source 'git://github.com/guardian/specs'
target 'Example' do
  pod 'MultiplatformOphan'
end

Here is an example of this applied to the Guardian's iOS app.

Multiplatform

Add multiplatform-ophan as a dependency (available in Maven Central):

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation 'com.gu.kotlin:multiplatform-ophan:<version>'
            }
        }
    }
}

Scala

Add this to your project's sbt config (available in Maven Central):

# build.sbt

libraryDependencies += "com.gu.kotlin" % "multiplatform-ophan-jvm" % "<version>"

Usage

Create an instance of OphanDispatcher and then use its dispatchEvent method to send Event instances to Ophan.

TODO: Add more detail here!

Release process

GitHub Actions are used to publish this library. The credentials required for signing and publishing builds are stored as repository secrets.

After making a release (with the Publish release workflow) please follow these additional steps:

  1. Tag the commit which was released with `git tag -a v -m ""
  2. Use find-replace to update all version numbers in the repo:
    • in [README.md] the "most recent version" should be the <version> that was just released, and the "snapshot version" should be the <new-version> that will succeed <version>
    • and everywhere else all version numbers should be changed to <new-version>.
  3. Commit and push and a <new-version>-SNAPSHOT will be published automatically.

About

A Kotlin Multiplatform client library for Ophan.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •