Pusher Chatkit Android
Find out more about Chatkit here.
The SDK is written in Kotlin, but aimed to be as Java-friendly as possible. Please report incompatibilities with Java as bugs.
Requirements
- minSdkVersion is 19 (KitKat)
Installation
The project is hosted primarily on JCenter, and synced to Maven Central.
The latest release version can be seen in the badges above.
Deprecated versions
Versions of the library below 1.0.0 are no longer supported by the backend.
To view a list of changes, please refer to the CHANGELOG.
Gradle
repositories {
jcenter()
}
dependencies {
// ...
implementation 'com.pusher:chatkit-android:$chatkit-version'
}
Maven
<!-- optional, add the primary source repo.
exclude to use mirrored version from Maven Central -->
<repositories>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
<repositories>
<dependency>
<groupId>com.pusher</groupId>
<artifactId>chatkit-android</artifactId>
<version>VERSION</version>
</dependency>
Development
When building this project, you may choose to use a local version of
pusher-platform-android
.
To do so you can add the path to your local copy in your
~/.gradle/gradle.properties
:
pusher_platform_local=/path/to/pusher-platform-android
It can be either a relative or absolute path.
Testing
The SDK has integration tests which run against a real Chatkit server.
In order to run them, you must provide Chatkit instance credentials in
your Gradle local.properties
(or as -D
arguments to the VM executing
the tests)
Important: The tests may delete any and all resources associated with the instance you provide. Create a new one. Do not share it with any other use.
chatkit_integration_locator=<instance locator>
chatkit_integration_key=<instance key>
Publishing
jCenter
The two artifacts this project produces (chatkit-core
and chatkit-android
)
are published in jCenter
.
Firstly, make sure you have a BinTray account. To get the api key go to Profile > Edit > Api Key
Then you need to set up a user name and api key.
Either on your local ~/.gradle/gradle.properties
as:
bintrayUser=you-bintray-user-name
bintrayApiKey=your-bintray-api-key
Or as environment variables (mainly for CI):
BINTRAY_USER=you-bintray-user-name
BINTRAY_API_KEY=your-bintray-api-key
You will also need to have SONATYPE_GPG_PASSPHRASE
set as an environment
variable. This is, as the name suggests, the GPG passphrase for the Maven
signing key.
Now, to do the actual release run:
gradlew build
gradlew bintrayUpload
Note: The publish action will both override the current release (if it has the same version name as the current) and automatically publish the new version.
Maven
You should sync the artefacts to Maven from the Bintray web interface.