A Kotlin Multiplatform client library for Ophan. Available for Android, iOS, and other Multiplatform projects.
The most recent version is 0.2.0
Snapshot version: 0.2.1-SNAPSHOT
Add multiplatform-ophan as a dependency (available in Maven Central):
# Module-level build.gradle
dependencies {
implementation 'com.gu.kotlin:multiplatform-ophan:<version>'
}
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.
Add multiplatform-ophan as a dependency (available in Maven Central):
kotlin {
sourceSets {
commonMain {
dependencies {
implementation 'com.gu.kotlin:multiplatform-ophan:<version>'
}
}
}
}
Add this to your project's sbt config (available in Maven Central):
# build.sbt
libraryDependencies += "com.gu.kotlin" % "multiplatform-ophan-jvm" % "<version>"
Create an instance of OphanDispatcher and then use its dispatchEvent method to send Event instances to Ophan.
TODO: Add more detail here!
GitHub Actions are used to publish this library. The credentials required for signing and publishing builds are stored as repository secrets.
- The Publish snapshot
workflow publishes a snapshot to Sonatype's
snapshot repo automatically each time
mainis changed. - The Publish release workflow is invoked manually and publishes to Sonatype's staging repo, from which it can be pushed into Maven Central.
After making a release (with the Publish release workflow) please follow these additional steps:
- Tag the commit which was released with `git tag -a v -m ""
- 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>.
- in [README.md] the "most recent version" should be the
- Commit and push and a
<new-version>-SNAPSHOTwill be published automatically.