Skip to content

Commit

Permalink
Removed the square wire runtime requirement (#3)
Browse files Browse the repository at this point in the history
* Removed the square wire runtime requirement

added a pom.xml dependency that should automatically
pull in the runtime dependency.

* fixed the github token permissions
  • Loading branch information
rahul27 authored Sep 8, 2021
1 parent eac8d6e commit a68a613
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository includes a sample app that demonstrates the use of the Moonsense
## TLDR

- Clone this repository.
- Generate a [personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) on Github with `repo` permissions.
- Generate a [personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) on Github with `read:packages` permissions.
- Add your Github `username` and `token` as a gradle property. The easiest way to do this is to add the following lines to `~/.gradle/gradle.properties`
```gradle
gpr.user=<username goes here>
Expand Down Expand Up @@ -43,7 +43,7 @@ The library has been hosted using [Github Packages](https://github.com/features/
}
```

Since the access to the maven repository is restricted you will need to include your `username` and [personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to reference the SDK library. Details around generating a personal access token can be found [here](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)). Make sure you grant `repo` access to reference the library. Once you have the `username` and `token` add it to your gradle properties. The easiest way is to add the following lines to `~/.gradle/gradle.properties`:
Since the access to the maven repository is restricted you will need to include your `username` and [personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to reference the SDK library. Details around generating a personal access token can be found [here](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)). Make sure you grant `read:packages` access to reference the library. Once you have the `username` and `token` add it to your gradle properties. The easiest way is to add the following lines to `~/.gradle/gradle.properties`:

```gradle
gpr.user=<username goes here>
Expand All @@ -59,12 +59,6 @@ With the credentials in place your are ready to include the following line to ad
implementation("io.moonsense:android-sdk:0.1.0-alpha2")
```

Note that the SDK also depends on the square wire runtime. We have to manually add it in as dependency as well:

```gradle
implementation("com.squareup.wire:wire-runtime:3.7.0")
```

## Usage

The SDK needs to be initialized before it can be used. Use the `initialize()` method in either an `Application.onCreate()` or `Activity.onCreate()` to prepare the SDK for recording. The `initialize()` call expects a `publicToken` that can be generated using the [Moonsense Console](https://console.moonsense.cloud/). In order to obtain a token you need to:
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ object Versions {
const val junitAndroidX = "1.1.3"
const val espressoCore = "3.4.0"
const val constraintLayout = "2.1.0"
const val squareWireRuntime = "3.7.0"
}
1 change: 0 additions & 1 deletion sample-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ android {

dependencies {
implementation("io.moonsense:android-sdk:${AppConfig.versionName}")
implementation("com.squareup.wire:wire-runtime:${Versions.squareWireRuntime}")
implementation("androidx.constraintlayout:constraintlayout:${Versions.constraintLayout}")
testImplementation("junit:junit:${Versions.junit}")
androidTestImplementation("androidx.test.ext:junit:${Versions.junitAndroidX}")
Expand Down

0 comments on commit a68a613

Please sign in to comment.