Skip to content

Commit

Permalink
Merge pull request #36 from smartcar/update-readme-and-docs
Browse files Browse the repository at this point in the history
chore: Updating docs and readme
  • Loading branch information
s-ashwinkumar authored Sep 4, 2024
2 parents fcff3a2 + 76d1af8 commit 0bd5d93
Show file tree
Hide file tree
Showing 26 changed files with 106 additions and 4,879 deletions.
66 changes: 66 additions & 0 deletions .buddy/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
- pipeline: "CD"
events:
- type: "PUSH"
refs:
- "refs/heads/master"
fail_on_prepare_env_warning: true
actions:
- action: "Publish"
type: "BUILD"
docker_image_name: "library/openjdk"
docker_image_tag: "20"
execute_commands:
- "export ANDROID_HOME=\"/opt/android/sdk\""
- "export PATH=$PATH:/opt/android/sdk/cmdline-tools/tools/bin"
- "if [ ! -d \"$ANDROID_HOME/cmdline-tools\" ]; then"
- " curl -o sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip"
- " unzip sdk.zip"
- " rm sdk.zip"
- " mkdir \"$ANDROID_HOME/cmdline-tools\""
- " mv cmdline-tools \"$ANDROID_HOME/cmdline-tools/tools\""
- " yes | \"$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager\" --licenses"
- "fi"
- ""
- "chmod +x gradlew"
- "export ORG_GRADLE_PROJECT_signingKey=\"$(cat /buddy-variables/cismartcar_com_pgp)\""
- "# Publish"
- ""
- "./gradlew publish closeAndReleaseStagingRepository"
- ""
- ""
setup_commands:
- "microdnf install unzip findutils"
cached_dirs:
- "/root/.gradle"
- "/opt/android/sdk"
shell: "BASH"
- action: "Send notification"
type: "SLACK"
content: "[#$BUDDY_EXECUTION_ID] $BUDDY_PIPELINE_NAME Successfully deployed <$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME>"
blocks: "[\n\t{\n\t\t\"type\": \"section\",\n\t\t\"fields\": [\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Successful run:* <$BUDDY_EXECUTION_URL|Execution #$BUDDY_EXECUTION_ID $BUDDY_EXECUTION_COMMENT>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Pipeline:* <$BUDDY_PIPELINE_URL|$BUDDY_PIPELINE_NAME>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Ref:* $BUDDY_PIPELINE_REF_NAME\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Project:* <$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME>\"\n\t\t\t}\n\t\t]\n\t}\n]"
channel: "C047XPXG6"
integration: "L39J4q2Volej59vzdjNmGQBW71"
run_next: "IN_HARD_PARALLEL"
- action: "Push Git Tag"
type: "BUILD"
docker_image_name: "node"
docker_image_tag: "20"
execute_commands:
- "eval \"$(ssh-agent -s)\""
- "ssh-add ~/.ssh/smartcar_ci_travis_04_15_2021"
- "ssh-keyscan github.com >> /root/.ssh/known_hosts"
- "git config --global user.email \"[email protected]\""
- "git config --global user.name \"Buddy CI User\""
- ""
- "export SDK_VERSION=$(cat smartcar-auth/gradle.properties | grep -E '^libVersion=.*$' | sed 's/^libVersion=//')"
- "git config remote.$BUDDY_REPO_SLUG.url || git remote add $BUDDY_REPO_SLUG $BUDDY_REPO_SSH_URL.git"
- "git tag -af v$SDK_VERSION -m \"Buddy Generated Tag\""
- "git push $BUDDY_REPO_SLUG v$SDK_VERSION"
shell: "BASH"
- action: "Send notification-1"
type: "SLACK"
trigger_time: "ON_FAILURE"
content: "[#$BUDDY_EXECUTION_ID] $BUDDY_PIPELINE_NAME Failed to deploy <$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME> to production."
blocks: "[\n\t{\n\t\t\"type\": \"section\",\n\t\t\"fields\": [\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Failed run:* <$BUDDY_EXECUTION_URL|Execution #$BUDDY_EXECUTION_ID $BUDDY_EXECUTION_COMMENT>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Pipeline:* <$BUDDY_PIPELINE_URL|$BUDDY_PIPELINE_NAME>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Ref:* $BUDDY_PIPELINE_REF_NAME\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Project:* <$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME>\"\n\t\t\t}\n\t\t]\n\t}\n]"
channel: "C0ERCSYEL"
integration: "L39J4q2Volej59vzdjNmGQBW71"
33 changes: 33 additions & 0 deletions .buddy/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
- pipeline: "CI"
events:
- type: "PUSH"
refs:
- "refs/heads/*"
fail_on_prepare_env_warning: true
actions:
- action: "Build"
type: "BUILD"
docker_image_name: "library/openjdk"
docker_image_tag: "20"
execute_commands:
- "export ANDROID_HOME=\"/opt/android/sdk\""
- "export PATH=$PATH:/opt/android/sdk/cmdline-tools/tools/bin"
- "if [ ! -d \"$ANDROID_HOME/cmdline-tools\" ]; then"
- " curl -o sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip"
- " unzip sdk.zip"
- " rm sdk.zip"
- " mkdir \"$ANDROID_HOME/cmdline-tools\""
- " mv cmdline-tools \"$ANDROID_HOME/cmdline-tools/tools\""
- " yes | \"$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager\" --licenses"
- "fi"
- ""
- "chmod +x gradlew"
- "./gradlew build check"
- "# ./gradlew assembleDebug"
- "# ./gradlew assembleRelease"
setup_commands:
- "microdnf install unzip findutils"
cached_dirs:
- "/root/.gradle"
- "/opt/android/sdk"
shell: "BASH"
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ Add the following to your application's `build.gradle` dependencies:

```
dependencies {
implementation 'com.smartcar.sdk:smartcar-auth:3.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'com.smartcar.sdk:smartcar-auth:4.0.0'
}
```

## Usage

1. Instantiate a new [`SmartcarAuth`](https://smartcar.github.io/android-sdk/com/smartcar/sdk/SmartcarAuth.html) instance with a [`SmartcarCallback`](https://smartcar.github.io/android-sdk/com/smartcar/sdk/SmartcarCallback.html) handler:
1. Instantiate a new [`SmartcarAuth`](https://javadoc.io/doc/com.smartcar.sdk/smartcar-auth/latest/com/smartcar/sdk/SmartcarAuth.html) instance with a [`SmartcarCallback`](https://javadoc.io/doc/com.smartcar.sdk/smartcar-auth/latest/com/smartcar/sdk/SmartcarCallback.html) handler:

```java
import com.smartcar.sdk.SmartcarAuth;
Expand Down Expand Up @@ -56,7 +55,7 @@ Button connectButton = findViewById(R.id.connect_button);
smartcarAuth.addClickHandler(getApplicationContext(), connectButton);
```

3. Use the [`AuthUrlBuilder`](https://smartcar.github.io/android-sdk/com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html) for additional configuration:
3. Use the [`AuthUrlBuilder`](https://javadoc.io/doc/com.smartcar.sdk/smartcar-auth/latest/com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html) for additional configuration:

```java
String authUrl = smartcarAuth.authUrlBuilder()
Expand All @@ -79,9 +78,9 @@ Please use Android Studio 3.5 to develop on the Smartcar Android SDK.

[smartcar-dashboard]: https://dashboard.smartcar.com/login/
[smartcar-docs]: https://smartcar.com/docs
[ci-image]: https://travis-ci.com/smartcar/android-sdk.svg?token=6Yrkze1DNb8WHnHxrCy6&branch=master
[ci-url]: https://travis-ci.com/smartcar/android-sdk
[javadoc-image]: https://img.shields.io/badge/javadoc-3.1.2-brightgreen.svg
[javadoc-url]: https://smartcar.github.io/android-sdk
[ci-image]: https://app.buddy.works/smartcar/android-sdk/pipelines/pipeline/504649/badge.svg?token=97cfcc42803fd12732976ed9738a7a119d87532ffdd2686b5513bbaef42bad93
[ci-url]: https://app.buddy.works/smartcar/android-sdk/pipelines/pipeline/504649
[javadoc-image]: https://javadoc.io/badge2/com.smartcar.sdk/smartcar-auth/javadoc.svg
[javadoc-url]: https://javadoc.io/doc/com.smartcar.sdk/smartcar-auth
[maven-image]: https://img.shields.io/maven-central/v/com.smartcar.sdk/smartcar-auth.svg?label=Maven%20Central
[maven-url]: https://central.sonatype.com/artifact/com.smartcar.sdk/smartcar-auth
24 changes: 0 additions & 24 deletions docs/allclasses-frame.html

This file was deleted.

24 changes: 0 additions & 24 deletions docs/allclasses-noframe.html

This file was deleted.

Loading

0 comments on commit 0bd5d93

Please sign in to comment.