Skip to content

Commit

Permalink
readme updates (#1)
Browse files Browse the repository at this point in the history
* update package to match group name

* update publish artifact info

* gradle bug fix

* update readme

* fix github actions
  • Loading branch information
wenxi-zeng committed Mar 7, 2022
1 parent 3c3e5d7 commit 8513caf
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:

cancel_previous:

permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
Expand Down
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
// add badges and stuff here
# Analytics-Kotlin Firebase

# Destination
Add Firebase device mode support to your applications via this plugin for [Analytics-Kotlin](https://github.com/segmentio/analytics-kotlin)

## Getting Started
## Adding the dependency

// TODO
To install the Segment-Firebase integration, simply add this line to your gradle file:

```
implementation 'com.segment.analytics.kotlin.destinations:firebase:1.4.4'
```

Or the following for Kotlin DSL

```
implementation("com.segment.analytics.kotlin.destinations:firebase:1.4.4")
```



## Using the Plugin in your App

Open the file where you setup and configure the Analytics-Kotlin library. Add this plugin to the list of imports.

```
import com.segment.analytics.kotlin.destinations.plugins.FirebaseDestination
```

Just under your Analytics-Kotlin library setup, call `analytics.add(plugin = ...)` to add an instance of the plugin to the Analytics timeline.

```
analytics = Analytics("<YOUR WRITE KEY>", applicationContext) {
this.flushAt = 3
this.trackApplicationLifecycleEvents = true
}
analytics.add(plugin = FirebaseDestination(applicationContext))
```

Your events will now begin to flow to Firebase in device mode.


## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License
```
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ android.enableJetifier=true
kotlin.code.style=official

# Deployment variables
GROUP=com.segment.analytics.kotlin
GROUP=com.segment.analytics.kotlin.destinations

VERSION_CODE=100
VERSION_NAME=1.0.0
VERSION_CODE=144
VERSION_NAME=1.4.4

POM_ARTIFACT_ID=analytics-kotlin-firebase
POM_NAME=analytics-kotlin-firebase
POM_ARTIFACT_ID=firebase
POM_NAME=firebase
POM_DESCRIPTION=Destination for Firebase

POM_URL=https://github.com/segmentio/analytics-kotlin-firebase
Expand Down
5 changes: 3 additions & 2 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ android {

defaultConfig {
multiDexEnabled = true
minSdk = 21
minSdk = 16
targetSdk = 31

testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles("proguard-consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = true
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.segment.analytics.destinations.plugins
package com.segment.analytics.kotlin.destinations.plugins

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.segment.analytics.destinations.plugins.test", appContext.packageName)
assertEquals("com.segment.analytics.kotlin.destinations.plugins.test", appContext.packageName)
}
}
2 changes: 1 addition & 1 deletion lib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.segment.analytics.destinations.plugins">
package="com.segment.analytics.kotlin.destinations.plugins">

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.segment.analytics.destinations.plugins
package com.segment.analytics.kotlin.destinations.plugins

import android.annotation.SuppressLint
import android.app.Activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.segment.analytics.destinations.plugins
package com.segment.analytics.kotlin.destinations.plugins

import android.app.Activity
import android.content.Context
Expand Down

0 comments on commit 8513caf

Please sign in to comment.